pub enum ImgalError {
Show 19 variants
InvalidAxis {
axis_idx: usize,
dim_len: usize,
},
InvalidAxisLengthLess {
arr_name: &'static str,
axis_idx: usize,
value: usize,
},
InvalidAxisLengthExpected {
arr_name: &'static str,
axis_idx: usize,
expected: usize,
got: usize,
},
InvalidArrayLengthExpected {
arr_name: &'static str,
expected: usize,
got: usize,
},
InvalidArrayLengthMinimum {
arr_name: &'static str,
arr_len: usize,
min_len: usize,
},
InvalidAxisValueGreaterEqual {
arr_name: &'static str,
axis_idx: usize,
value: usize,
},
InvalidAxisValueNotAMultipleOf {
arr_name: &'static str,
axis_idx: usize,
multiple: usize,
},
InvalidGeneric {
msg: &'static str,
},
InvalidParameterEmptyArray {
param_name: &'static str,
},
InvalidParameterGreater {
a_param_name: &'static str,
b_param_name: &'static str,
},
InvalidParameterValueEqual {
param_name: &'static str,
value: usize,
},
InvalidParameterValueGreater {
param_name: &'static str,
value: usize,
},
InvalidParameterValueLess {
param_name: &'static str,
value: usize,
},
InvalidParameterValueOutsideRange {
param_name: &'static str,
value: f64,
min: f64,
max: f64,
},
InvalidPositiveRange {
start: usize,
end: usize,
},
InvalidSum {
expected: f64,
got: f64,
},
MismatchedArrayLengths {
a_arr_name: &'static str,
a_arr_len: usize,
b_arr_name: &'static str,
b_arr_len: usize,
},
MismatchedArrayShapes {
a_arr_name: &'static str,
a_shape: Vec<usize>,
b_arr_name: &'static str,
b_shape: Vec<usize>,
},
MismatchedDimensionLengths {
a_name: &'static str,
a_dim_len: usize,
b_name: &'static str,
b_dim_len: usize,
},
}Expand description
Image and function parameter validation errors.
ImgalError is used to return errors when validating array shapes, lengths
and parameter values.
Variants§
InvalidAxis
InvalidAxisLengthLess
InvalidAxisLengthExpected
InvalidArrayLengthExpected
InvalidArrayLengthMinimum
InvalidAxisValueGreaterEqual
InvalidAxisValueNotAMultipleOf
InvalidGeneric
InvalidParameterEmptyArray
InvalidParameterGreater
InvalidParameterValueEqual
InvalidParameterValueGreater
InvalidParameterValueLess
InvalidParameterValueOutsideRange
InvalidPositiveRange
InvalidSum
MismatchedArrayLengths
MismatchedArrayShapes
MismatchedDimensionLengths
Trait Implementations§
Source§impl Clone for ImgalError
impl Clone for ImgalError
Source§fn clone(&self) -> ImgalError
fn clone(&self) -> ImgalError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ImgalError
impl Debug for ImgalError
Source§impl Display for ImgalError
impl Display for ImgalError
Source§impl Error for ImgalError
impl Error for ImgalError
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 ImgalError
impl PartialEq for ImgalError
Source§fn eq(&self, other: &ImgalError) -> bool
fn eq(&self, other: &ImgalError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ImgalError
Auto Trait Implementations§
impl Freeze for ImgalError
impl RefUnwindSafe for ImgalError
impl Send for ImgalError
impl Sync for ImgalError
impl Unpin for ImgalError
impl UnsafeUnpin for ImgalError
impl UnwindSafe for ImgalError
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> 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