pub enum MoveToFrontMode {
None,
TakeLast,
Offset,
}Expand description
The way items are removed from the inventory. Indicates if empty spots are left, and if not, how to fill them.
Variants§
None
Don’t move items to the front when there is available space.
TakeLast
Takes the last element and puts it where the removed one was.
Offset
Moves all elements after the removed one.
Implementations§
Source§impl MoveToFrontMode
impl MoveToFrontMode
Sourcepub fn new_take_last() -> Self
pub fn new_take_last() -> Self
Constructs a new MoveToFrontMode::TakeLast.
Source§impl MoveToFrontMode
impl MoveToFrontMode
Sourcepub fn new_offset() -> Self
pub fn new_offset() -> Self
Constructs a new MoveToFrontMode::Offset.
Trait Implementations§
Source§impl Clone for MoveToFrontMode
impl Clone for MoveToFrontMode
Source§fn clone(&self) -> MoveToFrontMode
fn clone(&self) -> MoveToFrontMode
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MoveToFrontMode
impl Debug for MoveToFrontMode
Source§impl<'de> Deserialize<'de> for MoveToFrontMode
impl<'de> Deserialize<'de> for MoveToFrontMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MoveToFrontMode
impl RefUnwindSafe for MoveToFrontMode
impl Send for MoveToFrontMode
impl Sync for MoveToFrontMode
impl Unpin for MoveToFrontMode
impl UnwindSafe for MoveToFrontMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more