pub struct ShieldAbsorption {
pub absorbed: f32,
pub unabsorbed: f32,
pub change: ShieldChange,
}Expand description
Damage routing plus actual stored charge change for one accepted hit.
absorbed uses legacy damage arithmetic and can differ from the magnitude
of change.value_change() because f32 subtraction rounds. unabsorbed is
exactly what legacy Shield::absorb returns for the host’s health rules.
Fields§
§absorbed: f32§unabsorbed: f32§change: ShieldChangeTrait Implementations§
Source§impl Clone for ShieldAbsorption
impl Clone for ShieldAbsorption
Source§fn clone(&self) -> ShieldAbsorption
fn clone(&self) -> ShieldAbsorption
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 moreSource§impl Debug for ShieldAbsorption
impl Debug for ShieldAbsorption
Source§impl PartialEq for ShieldAbsorption
impl PartialEq for ShieldAbsorption
impl Copy for ShieldAbsorption
impl StructuralPartialEq for ShieldAbsorption
Auto Trait Implementations§
impl Freeze for ShieldAbsorption
impl RefUnwindSafe for ShieldAbsorption
impl Send for ShieldAbsorption
impl Sync for ShieldAbsorption
impl Unpin for ShieldAbsorption
impl UnwindSafe for ShieldAbsorption
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