Enum game_features::InventorySizingMode[][src]

pub enum InventorySizingMode {
    Fixed {
        size: usize,
    },
    Dynamic {
        min_size: usize,
        max_size: usize,
    },
}

The way the inventory size is handled.

Variants

Fixed

The inventory uses a fixed size.

Fields of Fixed

size: usize

The size of the inventory.

Dynamic

The inventory grows and shrinks depending on the content. Slot restrictions are ignored in this mode.

Fields of Dynamic

min_size: usize

The minimum size of the dynamic inventory.

max_size: usize

The maximum size of the dynamic inventory.

Implementations

impl InventorySizingMode[src]

pub fn new_fixed(size: usize) -> Self[src]

Constructs a new InventorySizingMode::Fixed.

impl InventorySizingMode[src]

pub fn new_dynamic(min_size: usize, max_size: usize) -> Self[src]

Constructs a new InventorySizingMode::Dynamic.

Trait Implementations

impl Clone for InventorySizingMode[src]

impl Debug for InventorySizingMode[src]

impl<'de> Deserialize<'de> for InventorySizingMode[src]

impl Serialize for InventorySizingMode[src]

Auto Trait Implementations

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.