pub struct Bounds<T> {
pub lower: Option<T>,
pub upper: Option<T>,
}Expand description
Per-variable box constraint.
§Examples
let b = Bounds::both(0.0_f64, 1.0);
assert_eq!(b.lower, Some(0.0));
assert_eq!(b.upper, Some(1.0));Fields§
§lower: Option<T>Optional lower bound.
upper: Option<T>Optional upper bound.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Bounds<T>where
T: Freeze,
impl<T> RefUnwindSafe for Bounds<T>where
T: RefUnwindSafe,
impl<T> Send for Bounds<T>where
T: Send,
impl<T> Sync for Bounds<T>where
T: Sync,
impl<T> Unpin for Bounds<T>where
T: Unpin,
impl<T> UnsafeUnpin for Bounds<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Bounds<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