#[non_exhaustive]pub struct FoodInfo {
pub item: u16,
pub name: &'static str,
pub food_points: u8,
pub saturation: f32,
}Expand description
A food item.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.item: u16Item id (resolved by name against this version’s item table).
name: &'static strItem name.
food_points: u8Hunger points restored.
saturation: f32Saturation restored.
Trait Implementations§
impl Copy for FoodInfo
impl StructuralPartialEq for FoodInfo
Auto Trait Implementations§
impl Forget for FoodInfo
impl Freeze for FoodInfo
impl RefUnwindSafe for FoodInfo
impl Send for FoodInfo
impl Sync for FoodInfo
impl Unpin for FoodInfo
impl UnsafeUnpin for FoodInfo
impl UnwindSafe for FoodInfo
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