pub struct StatInstance<K> {
pub key: K,
pub value: f64,
pub value_with_effectors: f64,
}Expand description
An instance of a stat. Contains a base value as well as a value after applying the stat effectors.
Fields§
§key: KThe key of the stat.
value: f64The base value of the stat.
value_with_effectors: f64The value of this stat after applying the effectors.
Implementations§
Trait Implementations§
Source§impl<K: Clone> Clone for StatInstance<K>
impl<K: Clone> Clone for StatInstance<K>
Source§fn clone(&self) -> StatInstance<K>
fn clone(&self) -> StatInstance<K>
Returns a copy 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<K: Debug> Debug for StatInstance<K>
impl<K: Debug> Debug for StatInstance<K>
Source§impl<'de, K> Deserialize<'de> for StatInstance<K>where
K: Deserialize<'de>,
impl<'de, K> Deserialize<'de> for StatInstance<K>where
K: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<K> Freeze for StatInstance<K>where
K: Freeze,
impl<K> RefUnwindSafe for StatInstance<K>where
K: RefUnwindSafe,
impl<K> Send for StatInstance<K>where
K: Send,
impl<K> Sync for StatInstance<K>where
K: Sync,
impl<K> Unpin for StatInstance<K>where
K: Unpin,
impl<K> UnwindSafe for StatInstance<K>where
K: UnwindSafe,
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