Struct game_features::ItemDefinitions[][src]

pub struct ItemDefinitions<K: Hash + Eq, S, D: Default> {
    pub defs: HashMap<K, ItemDefinition<K, S, D>>,
}

A simple repository mapping the key K to the corresponding ItemDefinition.

Fields

defs: HashMap<K, ItemDefinition<K, S, D>>

The definitions.

Implementations

impl<K: Hash + Eq, S, D: Default> ItemDefinitions<K, S, D>[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: Hash + Eq, S, D: Default> Default for ItemDefinitions<K, S, D>[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]

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, S, D: Default> Serialize for ItemDefinitions<K, S, D> where
    K: Serialize,
    S: Serialize,
    D: Serialize
[src]

Auto Trait Implementations

impl<K, S, D> RefUnwindSafe for ItemDefinitions<K, S, D> where
    D: RefUnwindSafe,
    K: RefUnwindSafe,
    S: RefUnwindSafe

impl<K, S, D> Send for ItemDefinitions<K, S, D> where
    D: Send,
    K: Send,
    S: Send

impl<K, S, D> Sync for ItemDefinitions<K, S, D> where
    D: Sync,
    K: Sync,
    S: Sync

impl<K, S, D> Unpin for ItemDefinitions<K, S, D> where
    D: Unpin,
    K: Unpin,
    S: Unpin

impl<K, S, D> UnwindSafe for ItemDefinitions<K, S, D> where
    D: UnwindSafe,
    K: UnwindSafe,
    S: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.