pub struct UpperBound<T>(/* private fields */);
Expand description
Interpret the value as an upper bound, see LowerBound
for more details.
Trait Implementations§
Source§impl<T: Clone> Clone for UpperBound<T>
impl<T: Clone> Clone for UpperBound<T>
Source§fn clone(&self) -> UpperBound<T>
fn clone(&self) -> UpperBound<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 UpperBound<T>
impl<T: Debug> Debug for UpperBound<T>
Source§impl<T: PartialOrd> PartialEq<T> for UpperBound<T>
impl<T: PartialOrd> PartialEq<T> for UpperBound<T>
Source§impl<T: PartialEq> PartialEq for UpperBound<T>
impl<T: PartialEq> PartialEq for UpperBound<T>
Source§impl<T: PartialOrd> PartialOrd<T> for UpperBound<T>
impl<T: PartialOrd> PartialOrd<T> for UpperBound<T>
Source§impl<T: PartialOrd + Clone> StatBound<T> for UpperBound<T>
impl<T: PartialOrd + Clone> StatBound<T> for UpperBound<T>
Source§fn union(&self, other: &Self) -> Option<UpperBound<T>>
fn union(&self, other: &Self) -> Option<UpperBound<T>>
The meet or tightest covering bound
Source§fn intersection(
&self,
other: &Self,
) -> Option<IntersectionResult<UpperBound<T>>>
fn intersection( &self, other: &Self, ) -> Option<IntersectionResult<UpperBound<T>>>
Refines the bounds to the most precise estimate we can make for that bound.
If the bounds are disjoint, then the result is
None
.
e.g. Precision::Inexact(5)
and Precision::Exact(6)
would result in Precision::Inexact(5)
.
A.k.a. the join
of the bound.Source§fn to_exact(&self) -> Option<&T>
fn to_exact(&self) -> Option<&T>
Returns the exact value from the bound if that value is exact, otherwise
None
.Source§fn into_value(self) -> Precision<T>
fn into_value(self) -> Precision<T>
Converts
Self
back to Precision<T>
, inverse of lift
.impl<T: Eq> Eq for UpperBound<T>
impl<T> StructuralPartialEq for UpperBound<T>
Auto Trait Implementations§
impl<T> Freeze for UpperBound<T>where
T: Freeze,
impl<T> RefUnwindSafe for UpperBound<T>where
T: RefUnwindSafe,
impl<T> Send for UpperBound<T>where
T: Send,
impl<T> Sync for UpperBound<T>where
T: Sync,
impl<T> Unpin for UpperBound<T>where
T: Unpin,
impl<T> UnwindSafe for UpperBound<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more