pub enum ScoreModifier {
Add(f64),
Multiply(f64),
Set(f64),
ConditionalBonus {
condition: String,
bonus: f64,
},
}
Expand description
Score modifier operations
Variants§
Add(f64)
Add a constant value
Multiply(f64)
Multiply by a factor
Set(f64)
Set to a specific value
ConditionalBonus
Add bonus based on condition
Trait Implementations§
Source§impl Clone for ScoreModifier
impl Clone for ScoreModifier
Source§fn clone(&self) -> ScoreModifier
fn clone(&self) -> ScoreModifier
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 ScoreModifier
impl Debug for ScoreModifier
Source§impl<'de> Deserialize<'de> for ScoreModifier
impl<'de> Deserialize<'de> for ScoreModifier
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
Source§impl Hash for ScoreModifier
impl Hash for ScoreModifier
Auto Trait Implementations§
impl Freeze for ScoreModifier
impl RefUnwindSafe for ScoreModifier
impl Send for ScoreModifier
impl Sync for ScoreModifier
impl Unpin for ScoreModifier
impl UnwindSafe for ScoreModifier
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