Struct game_features::StatDefinitions [−][src]
pub struct StatDefinitions<K: Hash + Eq> { pub defs: HashMap<K, StatDefinition<K>>, }
Expand description
The definitions of all known stats.
Fields
defs: HashMap<K, StatDefinition<K>>
Expand description
The definitions.
Implementations
impl<K: Hash + Eq> StatDefinitions<K>
[src]
impl<K: Hash + Eq> StatDefinitions<K>
[src]pub fn new(defs: HashMap<K, StatDefinition<K>>) -> Self
[src]
pub fn new(defs: HashMap<K, StatDefinition<K>>) -> Self
[src]Constructs a new StatDefinitions
.
impl<K: Hash + Eq + Clone> StatDefinitions<K>
[src]
impl<K: Hash + Eq + Clone> StatDefinitions<K>
[src]pub fn to_statset(&self) -> StatSet<K>
[src]
pub fn to_statset(&self) -> StatSet<K>
[src]Converts the StatDefinitions
into a StatSet
using the default stat values.
Trait Implementations
impl<K: Clone + Hash + Eq> Clone for StatDefinitions<K>
[src]
impl<K: Clone + Hash + Eq> Clone for StatDefinitions<K>
[src]fn clone(&self) -> StatDefinitions<K>
[src]
fn clone(&self) -> StatDefinitions<K>
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl<K: Hash + Eq> Default for StatDefinitions<K>
[src]
impl<K: Hash + Eq> Default for StatDefinitions<K>
[src]impl<'de, K: Hash + Eq> Deserialize<'de> for StatDefinitions<K> where
K: Deserialize<'de>,
[src]
impl<'de, K: Hash + Eq> Deserialize<'de> for StatDefinitions<K> where
K: Deserialize<'de>,
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl<K: Hash + Eq + Clone> From<Vec<StatDefinition<K>, Global>> for StatDefinitions<K>
[src]
impl<K: Hash + Eq + Clone> From<Vec<StatDefinition<K>, Global>> for StatDefinitions<K>
[src]fn from(t: Vec<StatDefinition<K>>) -> Self
[src]
fn from(t: Vec<StatDefinition<K>>) -> Self
[src]Performs the conversion.
Auto Trait Implementations
impl<K> RefUnwindSafe for StatDefinitions<K> where
K: RefUnwindSafe,
K: RefUnwindSafe,
impl<K> Send for StatDefinitions<K> where
K: Send,
K: Send,
impl<K> Sync for StatDefinitions<K> where
K: Sync,
K: Sync,
impl<K> Unpin for StatDefinitions<K> where
K: Unpin,
K: Unpin,
impl<K> UnwindSafe for StatDefinitions<K> where
K: UnwindSafe,
K: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,