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>>The definitions.
Implementations§
Source§impl<K: Hash + Eq, S, D: Default> ItemDefinitions<K, S, D>
impl<K: Hash + Eq, S, D: Default> ItemDefinitions<K, S, D>
Sourcepub fn new(defs: HashMap<K, ItemDefinition<K, S, D>>) -> Self
pub fn new(defs: HashMap<K, ItemDefinition<K, S, D>>) -> Self
Constructs a new ItemDefinitions.
Trait Implementations§
Source§impl<K: Clone + Hash + Eq, S: Clone, D: Clone + Default> Clone for ItemDefinitions<K, S, D>
impl<K: Clone + Hash + Eq, S: Clone, D: Clone + Default> Clone for ItemDefinitions<K, S, D>
Source§fn clone(&self) -> ItemDefinitions<K, S, D>
fn clone(&self) -> ItemDefinitions<K, S, D>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de, K, S, D> Deserialize<'de> for ItemDefinitions<K, S, D>
impl<'de, K, S, D> Deserialize<'de> for ItemDefinitions<K, S, D>
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<K: Hash + Eq + Clone, S, D: Default> From<Vec<ItemDefinition<K, S, D>>> for ItemDefinitions<K, S, D>
impl<K: Hash + Eq + Clone, S, D: Default> From<Vec<ItemDefinition<K, S, D>>> for ItemDefinitions<K, S, D>
Source§fn from(t: Vec<ItemDefinition<K, S, D>>) -> Self
fn from(t: Vec<ItemDefinition<K, S, D>>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<K, S, D> Freeze for ItemDefinitions<K, S, D>
impl<K, S, D> RefUnwindSafe for ItemDefinitions<K, S, D>
impl<K, S, D> Send for ItemDefinitions<K, S, D>
impl<K, S, D> Sync for ItemDefinitions<K, S, D>
impl<K, S, D> Unpin for ItemDefinitions<K, S, D>
impl<K, S, D> UnwindSafe for ItemDefinitions<K, S, D>
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