pub enum PointError {
DimMismatch {
expected: usize,
actual: usize,
},
OutOfRangeRank {
total: usize,
rank: usize,
},
OutOfRangeIndex {
size: usize,
index: usize,
},
ParseError {
reason: String,
},
}
Expand description
Errors that can occur when constructing or evaluating a Point
.
Variants§
DimMismatch
The number of coordinates does not match the number of dimensions defined by the associated extent.
This occurs when creating a Point
with a coordinate vector
of incorrect length relative to the dimensionality of the
extent.
Fields
OutOfRangeRank
The provided rank is outside the valid range for the extent.
Ranks are the linearized row-major indices of all points in
the extent, spanning the half-open interval [0, total)
. This
error occurs when a rank greater than or equal to total
is
requested.
Fields
OutOfRangeIndex
A coordinate index is outside the valid range for its dimension.
Each dimension of an extent has a size size
, with valid
indices spanning the half-open interval [0, size)
. This
error occurs when a coordinate index
is greater than or
equal to size
.
Fields
ParseError
Failed to parse a point from a string.
Trait Implementations§
Source§impl Debug for PointError
impl Debug for PointError
Source§impl Display for PointError
impl Display for PointError
Source§impl Error for PointError
impl Error for PointError
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
Auto Trait Implementations§
impl Freeze for PointError
impl RefUnwindSafe for PointError
impl Send for PointError
impl Sync for PointError
impl Unpin for PointError
impl UnwindSafe for PointError
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
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>
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>
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