pub enum Bin<T> {
SingleValued(T),
InclusiveInclusive(T, T),
InclusiveExclusive(T, T),
ExclusiveInclusive(T, T),
ExclusiveExclusive(T, T),
}
Expand description
Definition of a Bin
- Note: Most (currently all) implementations use more efficient representations of the bins underneath, but are capable of returning the bins in this representation on request
Variants§
SingleValued(T)
The bin consists of a single value. A value is inside the bin if it equals this value
InclusiveInclusive(T, T)
The bin is defined by two inclusive borders (left, right). a value is inside the bin, if left <= value <= right
InclusiveExclusive(T, T)
The bin is defined by an inclusive and an exclusive border (left, right). a value is inside the bin, if left <= value < right
ExclusiveInclusive(T, T)
The bin is defined by an exclusive and an inclusive border (left, right). a value is inside the bin, if left < value <= right
ExclusiveExclusive(T, T)
The bin is defined by two exclusive borders (left, right). a value is inside the bin, if left < value < right
Trait Implementations§
source§impl<'de, T> Deserialize<'de> for Bin<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Bin<T>where
T: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<T: Ord> Ord for Bin<T>
impl<T: Ord> Ord for Bin<T>
source§impl<T: PartialEq> PartialEq for Bin<T>
impl<T: PartialEq> PartialEq for Bin<T>
source§impl<T: PartialOrd> PartialOrd for Bin<T>
impl<T: PartialOrd> PartialOrd for Bin<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<T: Copy> Copy for Bin<T>
impl<T: Eq> Eq for Bin<T>
impl<T> StructuralEq for Bin<T>
impl<T> StructuralPartialEq for Bin<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Bin<T>where
T: RefUnwindSafe,
impl<T> Send for Bin<T>where
T: Send,
impl<T> Sync for Bin<T>where
T: Sync,
impl<T> Unpin for Bin<T>where
T: Unpin,
impl<T> UnwindSafe for Bin<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
§impl<S, T> Cast<T> for Swhere
T: Conv<S>,
impl<S, T> Cast<T> for Swhere
T: Conv<S>,
§impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
§fn try_cast_approx(self) -> Result<T, Error>
fn try_cast_approx(self) -> Result<T, Error>
§fn cast_approx(self) -> T
fn cast_approx(self) -> T
§impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
§fn cast_trunc(self) -> T
fn cast_trunc(self) -> T
Cast to integer, truncating Read more
§fn cast_nearest(self) -> T
fn cast_nearest(self) -> T
Cast to the nearest integer Read more
§fn cast_floor(self) -> T
fn cast_floor(self) -> T
Cast the floor to an integer Read more
§fn try_cast_trunc(self) -> Result<T, Error>
fn try_cast_trunc(self) -> Result<T, Error>
Try converting to integer with truncation Read more
§fn try_cast_nearest(self) -> Result<T, Error>
fn try_cast_nearest(self) -> Result<T, Error>
Try converting to the nearest integer Read more
§fn try_cast_floor(self) -> Result<T, Error>
fn try_cast_floor(self) -> Result<T, Error>
Try converting the floor to an integer Read more
§fn try_cast_ceil(self) -> Result<T, Error>
fn try_cast_ceil(self) -> Result<T, Error>
Try convert the ceiling to an integer Read more