Struct CombatEvent
pub struct CombatEvent {
pub common: CommonEvent,
pub result: CombatResult,
pub is_buff: bool,
pub total_strike_damage: i32,
pub total_buff_damage: i32,
pub shield_damage: u32,
pub target_downed: bool,
}Expand description
Combat event.
Fields§
§common: CommonEventCommon combat event information.
result: CombatResultCombat event result.
is_buff: boolIs buff.
total_strike_damage: i32Total strike damage inflicted.
total_buff_damage: i32Total buff damage inflicted.
shield_damage: u32Damage inflicted to shields (barrier).
target_downed: boolWhether target is currently downed.
Implementations§
§impl CombatEvent
impl CombatEvent
pub fn non_shield_strike_damage(&self) -> i32
pub fn non_shield_buff_damage(&self) -> i32
Trait Implementations§
§impl AsMut<CommonEvent> for CombatEvent
impl AsMut<CommonEvent> for CombatEvent
§fn as_mut(&mut self) -> &mut CommonEvent
fn as_mut(&mut self) -> &mut CommonEvent
Converts this type into a mutable reference of the (usually inferred) input type.
§impl AsRef<CommonEvent> for CombatEvent
impl AsRef<CommonEvent> for CombatEvent
§fn as_ref(&self) -> &CommonEvent
fn as_ref(&self) -> &CommonEvent
Converts this type into a shared reference of the (usually inferred) input type.
§impl Clone for CombatEvent
impl Clone for CombatEvent
§fn clone(&self) -> CombatEvent
fn clone(&self) -> CombatEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for CombatEvent
impl Debug for CombatEvent
§impl Deref for CombatEvent
impl Deref for CombatEvent
§type Target = CommonEvent
type Target = CommonEvent
The resulting type after dereferencing.
§fn deref(&self) -> &<CombatEvent as Deref>::Target
fn deref(&self) -> &<CombatEvent as Deref>::Target
Dereferences the value.
§impl DerefMut for CombatEvent
impl DerefMut for CombatEvent
§fn deref_mut(&mut self) -> &mut <CombatEvent as Deref>::Target
fn deref_mut(&mut self) -> &mut <CombatEvent as Deref>::Target
Mutably dereferences the value.
§impl<'de> Deserialize<'de> for CombatEvent
impl<'de> Deserialize<'de> for CombatEvent
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CombatEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CombatEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Extract for CombatEvent
impl Extract for CombatEvent
§impl From<CombatEvent> for CommonEvent
impl From<CombatEvent> for CommonEvent
§fn from(value: CombatEvent) -> CommonEvent
fn from(value: CombatEvent) -> CommonEvent
Converts to this type from the input type.
§impl Serialize for CombatEvent
impl Serialize for CombatEvent
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
§impl TryExtract for CombatEvent
impl TryExtract for CombatEvent
§fn can_extract(event: &Event) -> bool
fn can_extract(event: &Event) -> bool
Checks whether
Self can be extracted from the event.§fn try_extract(event: &Event) -> Option<Self>
fn try_extract(event: &Event) -> Option<Self>
Attempts to extract
Self from the combat event.Auto Trait Implementations§
impl Freeze for CombatEvent
impl RefUnwindSafe for CombatEvent
impl Send for CombatEvent
impl Sync for CombatEvent
impl Unpin for CombatEvent
impl UnsafeUnpin for CombatEvent
impl UnwindSafe for CombatEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more