Struct PlayerFood
#[non_exhaustive]pub struct PlayerFood {
pub level: i32,
pub saturation: f32,
pub exhaustion: f32,
}Expand description
A player’s food data.
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.level: i32The food level, 0 to 20.
saturation: f32The saturation, up to the food level.
exhaustion: f32The exhaustion; the game takes a saturation or food point at 4.
Trait Implementations§
§impl Clone for PlayerFood
impl Clone for PlayerFood
§fn clone(&self) -> PlayerFood
fn clone(&self) -> PlayerFood
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PlayerFood
§impl Debug for PlayerFood
impl Debug for PlayerFood
§impl From<PlayerFood> for PlayerFood
impl From<PlayerFood> for PlayerFood
§fn from(v: PlayerFood) -> PlayerFood
fn from(v: PlayerFood) -> PlayerFood
Converts to this type from the input type.
§impl PartialEq for PlayerFood
impl PartialEq for PlayerFood
impl StructuralPartialEq for PlayerFood
Auto Trait Implementations§
impl Freeze for PlayerFood
impl RefUnwindSafe for PlayerFood
impl Send for PlayerFood
impl Sync for PlayerFood
impl Unpin for PlayerFood
impl UnsafeUnpin for PlayerFood
impl UnwindSafe for PlayerFood
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