Struct inv_sys::Inv [−][src]
Implementations
impl<T> Inv<T> where
T: Stacksize + Eq + Clone, [src]
T: Stacksize + Eq + Clone,
pub fn new(maxslots: usize) -> Self[src]
pub fn place_at(&mut self, item: (T, usize), slot: usize) -> Option<(T, usize)>[src]
Returns an Optional Item for the amount of an item, that could not be placed
pub fn stack(&mut self, item: (T, usize)) -> Option<(T, usize)>[src]
Tries to stack the item, returns remaining item.assert_eq! If no item is found, that it can be stacked on, the place_at_first_free method is used
pub fn can_be_filled_with(&self, item: (T, usize)) -> bool[src]
If there still can be filled some slot with a minimum amount of 1, this should return true
pub fn place_at_first_free(&mut self, item: (T, usize)) -> Option<(T, usize)>[src]
Try to place the item at the first free spot, returns the remaining item
pub fn get_slot(&self, slot: usize) -> Option<&(T, usize)>[src]
Get item of a specific slot position
pub fn get_selected_slot(&self) -> Option<&(T, usize)>[src]
Get item of the selected slot position
pub fn set_selected_slot(&mut self, slot: usize) -> bool[src]
Set the selected slot
pub fn decrease_selected_slot(&mut self) -> bool[src]
Decreases the amount of the item in the selected slot by 1
Auto Trait Implementations
impl<T> RefUnwindSafe for Inv<T> where
T: RefUnwindSafe, [src]
T: RefUnwindSafe,
impl<T> Send for Inv<T> where
T: Send, [src]
T: Send,
impl<T> Sync for Inv<T> where
T: Sync, [src]
T: Sync,
impl<T> Unpin for Inv<T> where
T: Unpin, [src]
T: Unpin,
impl<T> UnwindSafe for Inv<T> where
T: UnwindSafe, [src]
T: UnwindSafe,
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, 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>,