Struct game_features::InventoryBuilder [−][src]
Expand description
Builder for Inventory
.
Implementations
impl<K: Clone, S: SlotType + Clone, U: Default + Clone> InventoryBuilder<K, S, U>
[src]
impl<K: Clone, S: SlotType + Clone, U: Default + Clone> InventoryBuilder<K, S, U>
[src]pub fn content(&mut self, value: Vec<Option<ItemInstance<K, U>>>) -> &mut Self
[src]
pub fn content(&mut self, value: Vec<Option<ItemInstance<K, U>>>) -> &mut Self
[src]The contents of the Inventory
.
None values indicate empty but existing inventory slots.
pub fn slot_restriction(&mut self, value: Vec<Option<S>>) -> &mut Self
[src]
pub fn slot_restriction(&mut self, value: Vec<Option<S>>) -> &mut Self
[src]Restricts what kind of item can go in different slots.
This is not compatible with InventorySizingMode::Dynamic
.
Maps to the inventory content using the index. None values indicate that there are no restrictions for that slot.
pub fn move_to_front(&mut self, value: MoveToFrontMode) -> &mut Self
[src]
pub fn move_to_front(&mut self, value: MoveToFrontMode) -> &mut Self
[src]Configures how item deletion is handled.
pub fn sizing_mode(&mut self, value: InventorySizingMode) -> &mut Self
[src]
pub fn sizing_mode(&mut self, value: InventorySizingMode) -> &mut Self
[src]Configures if the inventory resizes when item are inserted/removed or not.
Trait Implementations
Auto Trait Implementations
impl<K, S, U> RefUnwindSafe for InventoryBuilder<K, S, U> where
K: RefUnwindSafe,
S: RefUnwindSafe,
U: RefUnwindSafe,
K: RefUnwindSafe,
S: RefUnwindSafe,
U: RefUnwindSafe,
impl<K, S, U> Send for InventoryBuilder<K, S, U> where
K: Send,
S: Send,
U: Send,
K: Send,
S: Send,
U: Send,
impl<K, S, U> Sync for InventoryBuilder<K, S, U> where
K: Sync,
S: Sync,
U: Sync,
K: Sync,
S: Sync,
U: Sync,
impl<K, S, U> Unpin for InventoryBuilder<K, S, U> where
K: Unpin,
S: Unpin,
U: Unpin,
K: Unpin,
S: Unpin,
U: Unpin,
impl<K, S, U> UnwindSafe for InventoryBuilder<K, S, U> where
K: UnwindSafe,
S: UnwindSafe,
U: UnwindSafe,
K: UnwindSafe,
S: UnwindSafe,
U: 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