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: PartialOrd> PartialOrd for Bin<T>
impl<T: PartialOrd> PartialOrd for Bin<T>
impl<T: Copy> Copy for Bin<T>
impl<T: Eq> Eq for Bin<T>
impl<T> StructuralPartialEq for Bin<T>
Auto Trait Implementations§
impl<T> Freeze for Bin<T>where
T: Freeze,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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