Enum StackError
#[non_exhaustive]pub enum StackError {
Empty,
CountOverflow,
InvalidDamage,
ConflictingDamage,
}Expand description
A stack operation could not represent the requested count.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Empty
Empty stacks are represented by None, not by a zero-count item.
CountOverflow
Adding items would overflow the record’s count.
InvalidDamage
Damage must be a nonnegative integer representable by u32.
ConflictingDamage
A patch and the damage field (or a patch value and removal) disagree.
Trait Implementations§
§impl Clone for StackError
impl Clone for StackError
§fn clone(&self) -> StackError
fn clone(&self) -> StackError
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 moreimpl Copy for StackError
§impl Debug for StackError
impl Debug for StackError
§impl Display for StackError
impl Display for StackError
impl Eq for StackError
§impl Error for StackError
impl Error for StackError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
§impl PartialEq for StackError
impl PartialEq for StackError
impl StructuralPartialEq for StackError
Auto Trait Implementations§
impl Freeze for StackError
impl RefUnwindSafe for StackError
impl Send for StackError
impl Sync for StackError
impl Unpin for StackError
impl UnsafeUnpin for StackError
impl UnwindSafe for StackError
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