[−][src]Struct sulis_state::item_list::ItemList
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]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,