pub enum TooFewItemsOrOom {
TooFewItems(TooFewItems),
Oom(OutOfMemory),
}Expand description
An error returned by new_boxed_slice_from_iter.
Variants§
TooFewItems(TooFewItems)
The iterator did not yield enough items to fill the boxed slice.
Oom(OutOfMemory)
Failed to allocate space for the boxed slice.
Implementations§
Source§impl TooFewItemsOrOom
impl TooFewItemsOrOom
Sourcepub fn unwrap_oom(&self) -> OutOfMemory
pub fn unwrap_oom(&self) -> OutOfMemory
Unwrap the inner OutOfMemory error, or panic if this is a different
error variant.
Trait Implementations§
Source§impl Debug for TooFewItemsOrOom
impl Debug for TooFewItemsOrOom
Source§impl Display for TooFewItemsOrOom
impl Display for TooFewItemsOrOom
Source§impl Error for TooFewItemsOrOom
impl Error for TooFewItemsOrOom
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
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()
Source§impl From<OutOfMemory> for TooFewItemsOrOom
impl From<OutOfMemory> for TooFewItemsOrOom
Source§fn from(oom: OutOfMemory) -> Self
fn from(oom: OutOfMemory) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TooFewItemsOrOom
impl RefUnwindSafe for TooFewItemsOrOom
impl Send for TooFewItemsOrOom
impl Sync for TooFewItemsOrOom
impl Unpin for TooFewItemsOrOom
impl UnsafeUnpin for TooFewItemsOrOom
impl UnwindSafe for TooFewItemsOrOom
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