Enum vm_allocator::Error
source · pub enum Error {
Overflow,
OutOfRange(u32),
AlreadyReleased(u32),
NeverAllocated(u32),
ResourceNotAvailable,
InvalidRange(u64, u64),
InvalidAlignment,
Overlap(RangeInclusive, RangeInclusive),
InvalidStateTransition(RangeInclusive, NodeState),
UnalignedAddress,
Underflow,
InvalidSize(u64),
}
Expand description
Error type for IdAllocator usage.
Variants§
Overflow
Management operations on desired resource resulted in overflow.
OutOfRange(u32)
An id that is not part of the specified range was requested to be released.
AlreadyReleased(u32)
An id that was already released was requested to be released.
NeverAllocated(u32)
An id that was never allocated was requested to be released.
ResourceNotAvailable
The resource we want to use or update is not available.
InvalidRange(u64, u64)
The range to manage is invalid.
InvalidAlignment
Alignment value is invalid
Overlap(RangeInclusive, RangeInclusive)
The range that we try to insert into the interval tree is overlapping with another node from the tree.
InvalidStateTransition(RangeInclusive, NodeState)
A node state can be changed just from Free to Allocated, other transitions are not valid.
UnalignedAddress
Address is unaligned
Underflow
Management operations on desired resource resulted in underflow.
InvalidSize(u64)
The size of the desired resource is not invalid.
Trait Implementations§
source§impl Error for Error
impl Error for Error
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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 Ord for Error
impl Ord for Error
source§impl PartialEq for Error
impl PartialEq for Error
source§impl PartialOrd for Error
impl PartialOrd for Error
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Error
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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