#[non_exhaustive]pub enum InvalidToleranceReason {
Negative,
NotFinite,
}Expand description
Reason a raw tolerance cannot become a crate::Tolerance.
§Examples
use la_stack::prelude::*;
match LaError::invalid_tolerance(-1.0) {
LaError::InvalidTolerance {
reason: InvalidToleranceReason::Negative,
..
} => {}
_ => unreachable!("a finite negative tolerance has a negative reason"),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Negative
The tolerance is finite but negative.
NotFinite
The tolerance is NaN or positive/negative infinity.
Trait Implementations§
Source§impl Clone for InvalidToleranceReason
impl Clone for InvalidToleranceReason
Source§fn clone(&self) -> InvalidToleranceReason
fn clone(&self) -> InvalidToleranceReason
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for InvalidToleranceReason
Source§impl Debug for InvalidToleranceReason
impl Debug for InvalidToleranceReason
impl Eq for InvalidToleranceReason
Source§impl PartialEq for InvalidToleranceReason
impl PartialEq for InvalidToleranceReason
impl StructuralPartialEq for InvalidToleranceReason
Auto Trait Implementations§
impl Freeze for InvalidToleranceReason
impl RefUnwindSafe for InvalidToleranceReason
impl Send for InvalidToleranceReason
impl Sync for InvalidToleranceReason
impl Unpin for InvalidToleranceReason
impl UnsafeUnpin for InvalidToleranceReason
impl UnwindSafe for InvalidToleranceReason
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