pub enum IndexError {
OutOfBounds,
Invalid,
}
Expand description
The error returned when failing to construct an arbitrary index.
Variants§
OutOfBounds
The provided raw index was out of bounds of the container.
Invalid
The provided raw index was in bounds but not on an item border.
Trait Implementations§
Source§impl Clone for IndexError
impl Clone for IndexError
Source§fn clone(&self) -> IndexError
fn clone(&self) -> IndexError
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for IndexError
impl Debug for IndexError
Source§impl Hash for IndexError
impl Hash for IndexError
Source§impl PartialEq for IndexError
impl PartialEq for IndexError
impl Copy 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, Array> TrustedItem<&Array> for T
impl<T, Array> TrustedItem<&Array> for T
type Unit = <T as TrustedItem<Array>>::Unit
Source§fn vet<'id, I>(
idx: I,
container: &Container<'id, &Array>,
) -> Result<Index<'id, I, Unknown>, IndexError>where
I: Idx,
fn vet<'id, I>(
idx: I,
container: &Container<'id, &Array>,
) -> Result<Index<'id, I, Unknown>, IndexError>where
I: Idx,
Vet an index for being on item boundaries. Read more
Source§impl<T> TrustedItem<[T]> for T
impl<T> TrustedItem<[T]> for T
type Unit = T
Source§fn vet<'id, I>(
idx: I,
container: &Container<'id, [T]>,
) -> Result<Index<'id, I, Unknown>, IndexError>where
I: Idx,
fn vet<'id, I>(
idx: I,
container: &Container<'id, [T]>,
) -> Result<Index<'id, I, Unknown>, IndexError>where
I: Idx,
Vet an index for being on item boundaries. Read more
Source§impl<T, Array> TrustedItem<Box<Array>> for T
impl<T, Array> TrustedItem<Box<Array>> for T
type Unit = <T as TrustedItem<Array>>::Unit
Source§fn vet<'id, I>(
idx: I,
container: &Container<'id, Box<Array>>,
) -> Result<Index<'id, I, Unknown>, IndexError>where
I: Idx,
fn vet<'id, I>(
idx: I,
container: &Container<'id, Box<Array>>,
) -> Result<Index<'id, I, Unknown>, IndexError>where
I: Idx,
Vet an index for being on item boundaries. Read more
Source§impl<T> TrustedItem<Vec<T>> for Twhere
T: TrustedItem<[T]>,
impl<T> TrustedItem<Vec<T>> for Twhere
T: TrustedItem<[T]>,
type Unit = <T as TrustedItem<[T]>>::Unit
Source§fn vet<'id, I>(
idx: I,
container: &Container<'id, Vec<T>>,
) -> Result<Index<'id, I, Unknown>, IndexError>where
I: Idx,
fn vet<'id, I>(
idx: I,
container: &Container<'id, Vec<T>>,
) -> Result<Index<'id, I, Unknown>, IndexError>where
I: Idx,
Vet an index for being on item boundaries. Read more