pub struct StatCondition<K> {
pub stat_key: K,
pub condition: StatConditionType,
}
Expand description
Condition based on a stat to activate something.
Fields§
§stat_key: K
The key of the stat.
condition: StatConditionType
The type of condition.
Implementations§
Source§impl<K> StatCondition<K>
impl<K> StatCondition<K>
Sourcepub fn new(stat_key: K, condition: StatConditionType) -> Self
pub fn new(stat_key: K, condition: StatConditionType) -> Self
Constructs a new StatCondition
.
Trait Implementations§
Source§impl<K: Clone> Clone for StatCondition<K>
impl<K: Clone> Clone for StatCondition<K>
Source§fn clone(&self) -> StatCondition<K>
fn clone(&self) -> StatCondition<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 StatCondition<K>
impl<K: Debug> Debug for StatCondition<K>
Source§impl<'de, K> Deserialize<'de> for StatCondition<K>where
K: Deserialize<'de>,
impl<'de, K> Deserialize<'de> for StatCondition<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 StatCondition<K>where
K: Freeze,
impl<K> RefUnwindSafe for StatCondition<K>where
K: RefUnwindSafe,
impl<K> Send for StatCondition<K>where
K: Send,
impl<K> Sync for StatCondition<K>where
K: Sync,
impl<K> Unpin for StatCondition<K>where
K: Unpin,
impl<K> UnwindSafe for StatCondition<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