pub struct LightsaberModifier {
pub base_value: f64,
pub interval: (f64, f64),
}Expand description
Defines the value range of the stat boost of lightsabers.
Fields§
§base_value: f64§interval: (f64, f64)Implementations§
Source§impl LightsaberModifier
impl LightsaberModifier
Sourcepub fn interval(&self) -> RangeInclusive<f64>
pub fn interval(&self) -> RangeInclusive<f64>
Returns self.interval as a range (min..=max),
which can be useful e.g. for rand::random_range.
Trait Implementations§
Source§impl Clone for LightsaberModifier
impl Clone for LightsaberModifier
Source§fn clone(&self) -> LightsaberModifier
fn clone(&self) -> LightsaberModifier
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 Debug for LightsaberModifier
impl Debug for LightsaberModifier
Source§impl<'de> Deserialize<'de> for LightsaberModifier
impl<'de> Deserialize<'de> for LightsaberModifier
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 PartialEq for LightsaberModifier
impl PartialEq for LightsaberModifier
Source§impl Serialize for LightsaberModifier
impl Serialize for LightsaberModifier
impl StructuralPartialEq for LightsaberModifier
Auto Trait Implementations§
impl Freeze for LightsaberModifier
impl RefUnwindSafe for LightsaberModifier
impl Send for LightsaberModifier
impl Sync for LightsaberModifier
impl Unpin for LightsaberModifier
impl UnwindSafe for LightsaberModifier
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