pub struct StatTable {
pub hp: u16,
pub atk: u16,
pub def: u16,
pub spa: u16,
pub spd: u16,
pub spe: u16,
}Expand description
A full stat table.
Similar to PartialStatTable, but all values must be defined.
Fields§
§hp: u16§atk: u16§def: u16§spa: u16§spd: u16§spe: u16Implementations§
Source§impl StatTable
impl StatTable
Sourcepub fn entries<'s>(&'s self) -> StatTableEntries<'s> ⓘ
pub fn entries<'s>(&'s self) -> StatTableEntries<'s> ⓘ
Creates an iterator over all stat entries.
Sourcepub fn values<'s>(&'s self) -> impl Iterator<Item = u16> + 's
pub fn values<'s>(&'s self) -> impl Iterator<Item = u16> + 's
Creates an iterator over all stat values.
Sourcepub fn without_hp(&self) -> PartialStatTable
pub fn without_hp(&self) -> PartialStatTable
Copies the stat tale without the HP stat.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for StatTable
impl<'de> Deserialize<'de> for StatTable
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 From<&HashMap<Stat, u16>> for StatTable
impl From<&HashMap<Stat, u16>> for StatTable
Source§fn from(value: &PartialStatTable) -> Self
fn from(value: &PartialStatTable) -> Self
Converts to this type from the input type.
Source§impl<'s> IntoIterator for &'s StatTable
impl<'s> IntoIterator for &'s StatTable
impl Eq for StatTable
impl StructuralPartialEq for StatTable
Auto Trait Implementations§
impl Freeze for StatTable
impl RefUnwindSafe for StatTable
impl Send for StatTable
impl Sync for StatTable
impl Unpin for StatTable
impl UnsafeUnpin for StatTable
impl UnwindSafe for StatTable
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.