pub enum Bound {
NegInf,
Finite(BigRational),
PosInf,
}Expand description
An endpoint of an interval, which can be finite or infinite.
Variants§
Implementations§
Source§impl Bound
impl Bound
Sourcepub fn finite(r: BigRational) -> Self
pub fn finite(r: BigRational) -> Self
Create a finite bound.
Sourcepub fn is_infinite(&self) -> bool
pub fn is_infinite(&self) -> bool
Check if this bound is infinite.
Sourcepub fn is_neg_inf(&self) -> bool
pub fn is_neg_inf(&self) -> bool
Check if this bound is negative infinity.
Sourcepub fn is_pos_inf(&self) -> bool
pub fn is_pos_inf(&self) -> bool
Check if this bound is positive infinity.
Sourcepub fn as_finite(&self) -> Option<&BigRational>
pub fn as_finite(&self) -> Option<&BigRational>
Get the finite value, or None if infinite.
Trait Implementations§
impl Eq for Bound
Source§impl Ord for Bound
impl Ord for Bound
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Bound
impl PartialOrd for Bound
impl StructuralPartialEq for Bound
Auto Trait Implementations§
impl Freeze for Bound
impl RefUnwindSafe for Bound
impl Send for Bound
impl Sync for Bound
impl Unpin for Bound
impl UnsafeUnpin for Bound
impl UnwindSafe for Bound
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