pub enum AllocationReason {
ZeroSize,
ExceedsMaxSize,
}Expand description
Shared reasons for allocation request failures.
Variants§
ZeroSize
The requested size was zero.
ExceedsMaxSize
The requested size exceeded the current allocation limit.
Trait Implementations§
Source§impl Clone for AllocationReason
impl Clone for AllocationReason
Source§fn clone(&self) -> AllocationReason
fn clone(&self) -> AllocationReason
Returns a duplicate 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 AllocationReason
impl Debug for AllocationReason
Source§impl Display for AllocationReason
impl Display for AllocationReason
Source§impl Error for AllocationReason
impl Error for AllocationReason
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 PartialEq for AllocationReason
impl PartialEq for AllocationReason
impl Copy for AllocationReason
impl Eq for AllocationReason
impl StructuralPartialEq for AllocationReason
Auto Trait Implementations§
impl Freeze for AllocationReason
impl RefUnwindSafe for AllocationReason
impl Send for AllocationReason
impl Sync for AllocationReason
impl Unpin for AllocationReason
impl UnsafeUnpin for AllocationReason
impl UnwindSafe for AllocationReason
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