Enum GeometryError
pub enum GeometryError {
NonFiniteComponent {
type_name: &'static str,
component: &'static str,
value: f64,
},
NegativeRadius(f64),
NonFiniteRadius(f64),
NonFiniteTolerance(f64),
NegativeTolerance(f64),
IdenticalPoints,
ZeroDirectionVector,
InvalidBounds {
min_x: f64,
min_y: f64,
max_x: f64,
max_y: f64,
},
}Expand description
Errors returned by validated geometry constructors.
Variants§
NonFiniteComponent
A geometry component must be finite.
The type name, component name, and invalid value are included for diagnostics.
Fields
NegativeRadius(f64)
A circle radius cannot be negative.
The invalid radius value is included for diagnostics.
NonFiniteRadius(f64)
A circle radius must be finite.
The invalid radius value is included for diagnostics.
NonFiniteTolerance(f64)
A tolerance must be finite.
The invalid tolerance value is included for diagnostics.
NegativeTolerance(f64)
A tolerance cannot be negative.
The invalid tolerance value is included for diagnostics.
IdenticalPoints
Distinct points were required but identical points were supplied.
ZeroDirectionVector
A non-zero direction vector was required.
InvalidBounds
An axis-aligned bounding box corner ordering was invalid.
Trait Implementations§
§impl Clone for GeometryError
impl Clone for GeometryError
§fn clone(&self) -> GeometryError
fn clone(&self) -> GeometryError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for GeometryError
impl Debug for GeometryError
§impl Display for GeometryError
impl Display for GeometryError
§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)>
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()
§impl PartialEq for GeometryError
impl PartialEq for GeometryError
impl StructuralPartialEq for GeometryError
Auto Trait Implementations§
impl Freeze for GeometryError
impl RefUnwindSafe for GeometryError
impl Send for GeometryError
impl Sync for GeometryError
impl Unpin for GeometryError
impl UnsafeUnpin for GeometryError
impl UnwindSafe for GeometryError
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