pub enum IntervalError<T> {
InvalidBounds {
start: T,
end: T,
},
}Expand description
Validation errors for deterministic half-open intervals.
§Examples
use relmath::temporal::{Interval, IntervalError};
assert_eq!(
Interval::new(4, 4),
Err(IntervalError::InvalidBounds { start: 4, end: 4 })
);Variants§
InvalidBounds
The interval is invalid because start >= end.
Trait Implementations§
Source§impl<T: Clone> Clone for IntervalError<T>
impl<T: Clone> Clone for IntervalError<T>
Source§fn clone(&self) -> IntervalError<T>
fn clone(&self) -> IntervalError<T>
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 moreSource§impl<T: Debug> Debug for IntervalError<T>
impl<T: Debug> Debug for IntervalError<T>
Source§impl<T: Debug> Display for IntervalError<T>
impl<T: Debug> Display for IntervalError<T>
Source§impl<T: Debug> Error for IntervalError<T>
impl<T: Debug> Error for IntervalError<T>
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()
Source§impl<T: PartialEq> PartialEq for IntervalError<T>
impl<T: PartialEq> PartialEq for IntervalError<T>
impl<T: Eq> Eq for IntervalError<T>
impl<T> StructuralPartialEq for IntervalError<T>
Auto Trait Implementations§
impl<T> Freeze for IntervalError<T>where
T: Freeze,
impl<T> RefUnwindSafe for IntervalError<T>where
T: RefUnwindSafe,
impl<T> Send for IntervalError<T>where
T: Send,
impl<T> Sync for IntervalError<T>where
T: Sync,
impl<T> Unpin for IntervalError<T>where
T: Unpin,
impl<T> UnsafeUnpin for IntervalError<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for IntervalError<T>where
T: UnwindSafe,
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