#[non_exhaustive]pub enum GeometryError {
NonFinite(&'static str),
Degenerate(&'static str),
SingularTransform {
determinant: f64,
},
UnsupportedTransform {
shape: &'static str,
reason: &'static str,
},
UnsupportedOperation {
operation: &'static str,
shape: &'static str,
},
NoBoundary(&'static str),
InvalidArgument(&'static str),
DimensionMismatch {
left: String,
right: String,
},
UnknownUnit(String),
}Expand description
Errors produced by geometry operations.
Geometry functions never panic on bad input; they return one of these explicit results instead (non-finite numbers, degenerate shapes, unsupported transforms, …).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NonFinite(&'static str)
An input coordinate or parameter was NaN or infinite.
Degenerate(&'static str)
The shape has no extent where one is required (zero-length segment, zero radius, …).
SingularTransform
The transform has a (near) zero determinant and cannot be inverted.
UnsupportedTransform
The transform cannot be applied while keeping the shape’s semantics (for example a non-uniform scale applied to a circle).
UnsupportedOperation
The requested operation is not defined for this shape kind.
NoBoundary(&'static str)
No intersection or boundary was found where the operation needs one.
InvalidArgument(&'static str)
A parameter is outside its valid range.
DimensionMismatch
Two quantities with different physical dimensions were combined.
UnknownUnit(String)
A unit string could not be parsed.
Trait Implementations§
Source§impl Clone for GeometryError
impl Clone for GeometryError
Source§fn clone(&self) -> GeometryError
fn clone(&self) -> GeometryError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GeometryError
impl Debug for GeometryError
Source§impl Display for GeometryError
impl Display for GeometryError
Source§impl Error for GeometryError
impl Error for GeometryError
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
use the Display impl or to_string()
Source§impl PartialEq for GeometryError
impl PartialEq for GeometryError
Source§fn eq(&self, other: &GeometryError) -> bool
fn eq(&self, other: &GeometryError) -> bool
self and other values to be equal, and is used by ==.