Enum cell_map::error::Error [−][src]
pub enum Error { WindowLargerThanMap(Vector2<usize>, Vector2<usize>), PositionOutsideMap(String, Point2<f64>), IndexOutsideMap(Point2<usize>), WrongNumberOfLayers(usize, usize), LayerWrongShape((usize, usize), (usize, usize)), IoError(Error), JsonError(Error), InvalidBounds(Bounds), }
Expand description
Standard error type for errors related to CellMap
s.
Variants
Error returned when trying to construct a Windows
slicer using a semi_width
which
would create a window larger than the size of the map.
The given parent-frame position (name, first element) is outside the map.
The given index is outside the map.
Wrong number of layers, got (first) but expected (second)
Wrong shape of layer, got (first) but expected (second)
IoError(Error)
Errors associated with std::io
operations.
JsonError(Error)
Errors associated with serde_json
operations.
InvalidBounds(Bounds)
Error when bounds are invalid, i.e. the minimum is larger than the maximum
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.