pub enum IndexError {
BrokenNextLink,
BrokenPrevLink,
ElementIsFree,
ElementIsFreeSentinel,
IndexIsNone,
IndexIsStale,
IndexOutOfBounds,
}Expand description
An error type representing failures in list operations.
These errors typically arise from providing an invalid Index to a pool
method, such as one that is out of bounds or points to an already-freed element.
Variants§
BrokenNextLink
A consistency check failed: an element’s next link does not point back correctly.
BrokenPrevLink
A consistency check failed: an element’s prev link does not point back correctly.
ElementIsFree
The element at the index is on the pool’s free list and cannot be used.
ElementIsFreeSentinel
An attempt was made to operate on the free list’s own sentinel node.
IndexIsNone
The provided index was Index::NONE.
IndexIsStale
The index generation does not match the element’s generation.
IndexOutOfBounds
The provided index exceeds the bounds of the pool’s element vector.
Trait Implementations§
Source§impl Debug for IndexError
impl Debug for IndexError
Source§impl Display for IndexError
impl Display for IndexError
Source§impl Error for IndexError
impl Error for IndexError
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 PartialEq for IndexError
impl PartialEq for IndexError
impl Eq for IndexError
impl StructuralPartialEq for IndexError
Auto Trait Implementations§
impl Freeze for IndexError
impl RefUnwindSafe for IndexError
impl Send for IndexError
impl Sync for IndexError
impl Unpin for IndexError
impl UnsafeUnpin for IndexError
impl UnwindSafe for IndexError
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