Struct game_features::ItemDefinitionBuilder [−][src]
pub struct ItemDefinitionBuilder<K, S, D: Default> { /* fields omitted */ }
Expand description
Builder for ItemDefinition
.
Implementations
impl<K: Clone, S: Clone, D: Default + Clone> ItemDefinitionBuilder<K, S, D>
[src]
impl<K: Clone, S: Clone, D: Default + Clone> ItemDefinitionBuilder<K, S, D>
[src]pub fn slot_type(&mut self, value: S) -> &mut Self
[src]
pub fn slot_type(&mut self, value: S) -> &mut Self
[src]The type / item group that this item definition is part of.
pub fn friendly_name(&mut self, value: String) -> &mut Self
[src]
pub fn friendly_name(&mut self, value: String) -> &mut Self
[src]The friendly name of this item definition. Mostly used to find items by name instead of by key.
pub fn description(&mut self, value: String) -> &mut Self
[src]
pub fn description(&mut self, value: String) -> &mut Self
[src]The display description of this item definition.
pub fn maximum_stack(&mut self, value: Option<usize>) -> &mut Self
[src]
pub fn maximum_stack(&mut self, value: Option<usize>) -> &mut Self
[src]The maximum number of elements that can be in an item stack. Setting this value to 1 disables the ability to stack this type of item.
pub fn maximum_durability(&mut self, value: Option<usize>) -> &mut Self
[src]
pub fn maximum_durability(&mut self, value: Option<usize>) -> &mut Self
[src]The default maximum durability of this item. Setting this to None means that this item type doesn’t use the concept of durability and is unbreakable.
Trait Implementations
impl<K: Clone, S: Clone, D: Clone + Default> Clone for ItemDefinitionBuilder<K, S, D>
[src]
impl<K: Clone, S: Clone, D: Clone + Default> Clone for ItemDefinitionBuilder<K, S, D>
[src]fn clone(&self) -> ItemDefinitionBuilder<K, S, D>
[src]
fn clone(&self) -> ItemDefinitionBuilder<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<K: Default, S: Default, D: Default> Default for ItemDefinitionBuilder<K, S, D>
[src]
impl<K: Default, S: Default, D: Default> Default for ItemDefinitionBuilder<K, S, D>
[src]fn default() -> ItemDefinitionBuilder<K, S, D>
[src]
fn default() -> ItemDefinitionBuilder<K, S, D>
[src]Returns the “default value” for a type. Read more
Auto Trait Implementations
impl<K, S, D> RefUnwindSafe for ItemDefinitionBuilder<K, S, D> where
D: RefUnwindSafe,
K: RefUnwindSafe,
S: RefUnwindSafe,
D: RefUnwindSafe,
K: RefUnwindSafe,
S: RefUnwindSafe,
impl<K, S, D> Send for ItemDefinitionBuilder<K, S, D> where
D: Send,
K: Send,
S: Send,
D: Send,
K: Send,
S: Send,
impl<K, S, D> Sync for ItemDefinitionBuilder<K, S, D> where
D: Sync,
K: Sync,
S: Sync,
D: Sync,
K: Sync,
S: Sync,
impl<K, S, D> Unpin for ItemDefinitionBuilder<K, S, D> where
D: Unpin,
K: Unpin,
S: Unpin,
D: Unpin,
K: Unpin,
S: Unpin,
impl<K, S, D> UnwindSafe for ItemDefinitionBuilder<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