pub enum MemoryError {
ZeroLength,
MaximumBelowInitial {
initial: usize,
maximum: usize,
},
FixedSize,
ShrinkUnsupported {
current: usize,
requested: usize,
},
MaximumExceeded {
requested: usize,
maximum: usize,
},
Platform {
operation: &'static str,
},
RandomnessUnavailable,
}Expand description
Portable allocation, policy, or lifecycle failure.
Variants§
ZeroLength
Shared-memory regions cannot be empty.
MaximumBelowInitial
Configured maximum is smaller than the initial logical length.
Fields
FixedSize
Fixed-size policy rejects growth.
ShrinkUnsupported
Shrinking would silently discard user-owned bytes.
MaximumExceeded
Requested growth exceeds the configured limit.
Platform
Selected native backend rejected the bounded operation.
The operating-system CSPRNG could not mint object freshness.
Trait Implementations§
Source§impl Debug for MemoryError
impl Debug for MemoryError
Source§impl Display for MemoryError
impl Display for MemoryError
Source§impl Error for MemoryError
impl Error for MemoryError
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<MemoryError> for RegionError
impl From<MemoryError> for RegionError
Source§fn from(value: MemoryError) -> Self
fn from(value: MemoryError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MemoryError
impl RefUnwindSafe for MemoryError
impl Send for MemoryError
impl Sync for MemoryError
impl Unpin for MemoryError
impl UnsafeUnpin for MemoryError
impl UnwindSafe for MemoryError
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