#[non_exhaustive]pub enum SlotError {
AppendToSingle,
ReplaceOnMulti,
CapacityExceeded,
}Expand description
A typed error from the SlotValues append/replace operations. Payload-free
by the security standard: it names what went wrong, never the value or slot
the caller tried to act on.
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.
AppendToSingle
append was called on a single-valued slot. Single-valued slots take
replace; there is no append path that can grow one to two values.
ReplaceOnMulti
replace was called on a multi-valued slot. Multi-valued slots take
append; clear then re-append to reset.
CapacityExceeded
append would exceed the slot’s declared bound.
Trait Implementations§
impl Copy for SlotError
impl Eq for SlotError
Source§impl Error for SlotError
impl Error for SlotError
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 StructuralPartialEq for SlotError
Auto Trait Implementations§
impl Freeze for SlotError
impl RefUnwindSafe for SlotError
impl Send for SlotError
impl Sync for SlotError
impl Unpin for SlotError
impl UnsafeUnpin for SlotError
impl UnwindSafe for SlotError
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