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§
impl Copy for Error
impl Eq for Error
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()