Enum lgalloc::AllocError
source · pub enum AllocError {
Io(Error),
OutOfMemory,
InvalidSizeClass(usize),
Disabled,
UnalignedMemory,
}
Expand description
Allocation errors
Variants§
Io(Error)
IO error, unrecoverable
OutOfMemory
Out of memory, meaning that the pool is exhausted.
InvalidSizeClass(usize)
Size class too large or small
Disabled
Allocator disabled
UnalignedMemory
Failed to allocate memory that suits alignment properties.
Implementations§
source§impl AllocError
impl AllocError
sourcepub fn is_disabled(&self) -> bool
pub fn is_disabled(&self) -> bool
Check if this error is AllocError::Disabled
.
Trait Implementations§
source§impl Debug for AllocError
impl Debug for AllocError
source§impl Display for AllocError
impl Display for AllocError
source§impl Error for AllocError
impl Error for AllocError
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()
Auto Trait Implementations§
impl Freeze for AllocError
impl !RefUnwindSafe for AllocError
impl Send for AllocError
impl Sync for AllocError
impl Unpin for AllocError
impl !UnwindSafe for AllocError
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