pub enum IndexerError {
IncompatibleDimensionality(IncompatibleDimensionalityError),
OutOfBounds(Vec<u64>, Vec<u64>),
IncompatibleLength(u64, u64),
}Expand description
An incompatible indexer and array shape error.
Raised if an indexer references an out-of-bounds element or the dimensionality differs.
Variants§
IncompatibleDimensionality(IncompatibleDimensionalityError)
The indexer dimensionality is incompatible.
OutOfBounds(Vec<u64>, Vec<u64>)
The indexer references out-of-bounds array indices.
IncompatibleLength(u64, u64)
The indexer has an incompatible length.
Implementations§
Source§impl IndexerError
impl IndexerError
Sourcepub fn new_incompatible_dimensionality(
got: usize,
expected: usize,
) -> IndexerError
pub fn new_incompatible_dimensionality( got: usize, expected: usize, ) -> IndexerError
Create a new IndexerError where the dimensionality is incompatible.
Sourcepub fn new_oob(indices: Vec<u64>, shape: Vec<u64>) -> IndexerError
pub fn new_oob(indices: Vec<u64>, shape: Vec<u64>) -> IndexerError
Create a new IndexerError representing out-of-bounds indices.
Sourcepub fn new_incompatible_length(got: u64, expected: u64) -> IndexerError
pub fn new_incompatible_length(got: u64, expected: u64) -> IndexerError
Create a new IndexerError where the length is incompatible.
Trait Implementations§
Source§impl Clone for IndexerError
impl Clone for IndexerError
Source§fn clone(&self) -> IndexerError
fn clone(&self) -> IndexerError
Returns a duplicate 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 IndexerError
impl Debug for IndexerError
Source§impl Display for IndexerError
impl Display for IndexerError
Source§impl Error for IndexerError
impl Error for IndexerError
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 From<IncompatibleDimensionalityError> for IndexerError
impl From<IncompatibleDimensionalityError> for IndexerError
Source§fn from(source: IncompatibleDimensionalityError) -> IndexerError
fn from(source: IncompatibleDimensionalityError) -> IndexerError
Converts to this type from the input type.
Source§impl From<IndexerError> for ArrayBytesFixedDisjointViewCreateError
impl From<IndexerError> for ArrayBytesFixedDisjointViewCreateError
Source§fn from(source: IndexerError) -> ArrayBytesFixedDisjointViewCreateError
fn from(source: IndexerError) -> ArrayBytesFixedDisjointViewCreateError
Converts to this type from the input type.
Source§impl From<IndexerError> for CodecError
impl From<IndexerError> for CodecError
Source§fn from(source: IndexerError) -> CodecError
fn from(source: IndexerError) -> CodecError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for IndexerError
impl Send for IndexerError
impl Sync for IndexerError
impl RefUnwindSafe for IndexerError
impl Unpin for IndexerError
impl UnsafeUnpin for IndexerError
impl UnwindSafe for IndexerError
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more