pub enum Bound<T> {
Unbounded,
Inclusive(T),
Exclusive(T),
}Expand description
Boundary condition for numeric constraints
Uses ADT to prevent invalid states (e.g., both inclusive and exclusive)
Variants§
Unbounded
No constraint (-∞ or +∞)
Inclusive(T)
Inclusive bound (≤ or ≥)
Exclusive(T)
Exclusive bound (< or >)
Trait Implementations§
impl<T> StructuralPartialEq for Bound<T>
Auto Trait Implementations§
impl<T> Freeze for Bound<T>where
T: Freeze,
impl<T> RefUnwindSafe for Bound<T>where
T: RefUnwindSafe,
impl<T> Send for Bound<T>where
T: Send,
impl<T> Sync for Bound<T>where
T: Sync,
impl<T> Unpin for Bound<T>where
T: Unpin,
impl<T> UnwindSafe for Bound<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