pub struct FoodDef {
pub nutrition: u32,
pub saturation: f32,
pub can_always_eat: bool,
}Expand description
Nutritional properties for a food item.
Fields§
§nutrition: u32Hunger points restored (1 unit = half a drumstick).
saturation: f32Saturation modifier applied after eating.
can_always_eat: boolIf true, edible even when the hunger bar is full.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FoodDef
impl RefUnwindSafe for FoodDef
impl Send for FoodDef
impl Sync for FoodDef
impl Unpin for FoodDef
impl UnsafeUnpin for FoodDef
impl UnwindSafe for FoodDef
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