Enum cell_map::error::CellMapError [−][src]
pub enum CellMapError { WindowLargerThanMap(Vector2<usize>, Vector2<usize>), PositionOutsideMap(String, Point2<f64>), WrongNumberOfLayers(usize, usize), LayerWrongShape(Vector2<usize>, Vector2<usize>), LoadError(Box<dyn Error>), WriteError(Box<dyn Error>), }
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.
Wrong number of layers, got (first) but expected (second)
Wrong shape of layer, got (first) but expected (second)
Occurs when a map cannot be loaded from a file.
Occurs when a map cannot be written to a file.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for CellMapError
impl !Send for CellMapError
impl !Sync for CellMapError
impl Unpin for CellMapError
impl !UnwindSafe for CellMapError
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.