Struct game_features::ItemDefinitions [−][src]
pub struct ItemDefinitions<K: Hash + Eq, S, D: Default> { pub defs: HashMap<K, ItemDefinition<K, S, D>>, }
Expand description
A simple repository mapping the key K to the corresponding ItemDefinition
.
Fields
defs: HashMap<K, ItemDefinition<K, S, D>>
Expand description
The definitions.
Implementations
impl<K: Hash + Eq, S, D: Default> ItemDefinitions<K, S, D>
[src]
impl<K: Hash + Eq, S, D: Default> ItemDefinitions<K, S, D>
[src]pub fn new(defs: HashMap<K, ItemDefinition<K, S, D>>) -> Self
[src]
pub fn new(defs: HashMap<K, ItemDefinition<K, S, D>>) -> Self
[src]Constructs a new ItemDefinitions
.
Trait Implementations
impl<K: Clone + Hash + Eq, S: Clone, D: Clone + Default> Clone for ItemDefinitions<K, S, D>
[src]
impl<K: Clone + Hash + Eq, S: Clone, D: Clone + Default> Clone for ItemDefinitions<K, S, D>
[src]fn clone(&self) -> ItemDefinitions<K, S, D>
[src]
fn clone(&self) -> ItemDefinitions<K, S, D>
[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<'de, K: Hash + Eq, S, D: Default> Deserialize<'de> for ItemDefinitions<K, S, D> where
K: Deserialize<'de>,
S: Deserialize<'de>,
D: Deserialize<'de>,
[src]
impl<'de, K: Hash + Eq, S, D: Default> Deserialize<'de> for ItemDefinitions<K, S, D> where
K: Deserialize<'de>,
S: Deserialize<'de>,
D: 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, S, D: Default> From<Vec<ItemDefinition<K, S, D>, Global>> for ItemDefinitions<K, S, D>
[src]
impl<K: Hash + Eq + Clone, S, D: Default> From<Vec<ItemDefinition<K, S, D>, Global>> for ItemDefinitions<K, S, D>
[src]fn from(t: Vec<ItemDefinition<K, S, D>>) -> Self
[src]
fn from(t: Vec<ItemDefinition<K, S, D>>) -> Self
[src]Performs the conversion.
Auto Trait Implementations
impl<K, S, D> RefUnwindSafe for ItemDefinitions<K, S, D> where
D: RefUnwindSafe,
K: RefUnwindSafe,
S: RefUnwindSafe,
D: RefUnwindSafe,
K: RefUnwindSafe,
S: RefUnwindSafe,
impl<K, S, D> Send for ItemDefinitions<K, S, D> where
D: Send,
K: Send,
S: Send,
D: Send,
K: Send,
S: Send,
impl<K, S, D> Sync for ItemDefinitions<K, S, D> where
D: Sync,
K: Sync,
S: Sync,
D: Sync,
K: Sync,
S: Sync,
impl<K, S, D> Unpin for ItemDefinitions<K, S, D> where
D: Unpin,
K: Unpin,
S: Unpin,
D: Unpin,
K: Unpin,
S: Unpin,
impl<K, S, D> UnwindSafe for ItemDefinitions<K, S, D> where
D: UnwindSafe,
K: UnwindSafe,
S: UnwindSafe,
D: UnwindSafe,
K: UnwindSafe,
S: 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>,