pub struct Bar {
pub current: u16,
pub max: u16,
}Expand description
A value with its maximum on an item’s own entity, as the item’s slot
shows it: its durability, or its meter (see
FuelSetup).
The name is enshwick’s: the game’s durability or fuel value with its maximum.
§Examples
let worn = enshwick::inventory::Bar { current: 40, max: 160 };
assert!(worn.current < worn.max);Fields§
§current: u16What is left.
max: u16When full.
Trait Implementations§
impl Copy for Bar
impl Eq for Bar
impl StructuralPartialEq for Bar
Auto Trait Implementations§
impl Freeze for Bar
impl RefUnwindSafe for Bar
impl Send for Bar
impl Sync for Bar
impl Unpin for Bar
impl UnsafeUnpin for Bar
impl UnwindSafe for Bar
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