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)>
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 Ord for Error
impl Ord for Error
Source§impl PartialOrd for Error
impl PartialOrd for Error
impl Copy for Error
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
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