[][src]Struct sulis_state::item_list::ItemList

pub struct ItemList { /* fields omitted */ }

Implementations

impl ItemList[src]

pub fn clear(&mut self)[src]

pub fn iter(&self) -> Iter<'_, (u32, ItemState)>[src]

pub fn is_empty(&self) -> bool[src]

pub fn len(&self) -> usize[src]

pub fn get(&self, index: usize) -> Option<&(u32, ItemState)>[src]

pub fn get_quantity(&self, item: &ItemState) -> u32[src]

pub fn find_index(&self, state: &ItemState) -> Option<usize>[src]

pub fn add_quantity(&mut self, qty: u32, item_state: ItemState) -> usize[src]

Adds the specified count of this item, and returns the index the item was placed at

pub fn add(&mut self, item_state: ItemState) -> usize[src]

Adds one count of the specified item, and returns the index that the item was placed at

pub fn remove_all_at(&mut self, index: usize) -> Option<(u32, ItemState)>[src]

Removes the entire quantity of items at the specified index and returns it

pub fn remove(&mut self, index: usize) -> Option<ItemState>[src]

Remove an item from the list at the specified index and returns it. Only removes one count, so the item may still exist if there is more than one

Trait Implementations

impl Clone for ItemList[src]

impl Debug for ItemList[src]

impl Default for ItemList[src]

impl Index<usize> for ItemList[src]

type Output = (u32, ItemState)

The returned type after indexing.

Auto Trait Implementations

impl !RefUnwindSafe for ItemList

impl !Send for ItemList

impl !Sync for ItemList

impl Unpin for ItemList

impl !UnwindSafe for ItemList

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> 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]