Struct StackSplit
#[non_exhaustive]pub struct StackSplit {
pub taken: Option<ItemStack>,
pub remainder: Option<ItemStack>,
}Expand description
The two nonempty portions of a consuming split. Either portion can be absent.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.taken: Option<ItemStack>Up to the requested number of items.
remainder: Option<ItemStack>Items left after taking that portion.
Trait Implementations§
§impl Clone for StackSplit
impl Clone for StackSplit
§fn clone(&self) -> StackSplit
fn clone(&self) -> StackSplit
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for StackSplit
impl Debug for StackSplit
impl Eq for StackSplit
§impl PartialEq for StackSplit
impl PartialEq for StackSplit
impl StructuralPartialEq for StackSplit
Auto Trait Implementations§
impl Freeze for StackSplit
impl RefUnwindSafe for StackSplit
impl Send for StackSplit
impl Sync for StackSplit
impl Unpin for StackSplit
impl UnsafeUnpin for StackSplit
impl UnwindSafe for StackSplit
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