pub struct Stat { /* private fields */ }Implementations§
Source§impl Stat
impl Stat
pub const fn new(value: StatValue, max: StatValue) -> Self
pub const fn value(&self) -> StatValue
pub fn set_value(&mut self, value: StatValue)
pub fn increase_value(&mut self, amount: StatValue)
pub fn decrease_value(&mut self, amount: StatValue)
pub const fn curr_max(&self) -> StatValue
pub fn set_max(&mut self, max: StatValue)
pub fn increase_max(&mut self, amount: StatValue)
pub fn decrease_max(&mut self, amount: StatValue)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Stat
impl<'de> Deserialize<'de> for Stat
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 Ord for Stat
impl Ord for Stat
Source§impl PartialOrd for Stat
impl PartialOrd for Stat
impl Copy for Stat
impl Eq for Stat
impl StructuralPartialEq for Stat
Auto Trait Implementations§
impl Freeze for Stat
impl RefUnwindSafe for Stat
impl Send for Stat
impl Sync for Stat
impl Unpin for Stat
impl UnsafeUnpin for Stat
impl UnwindSafe for Stat
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