pub struct OrdRangeInc(pub RangeInclusive<u64>);
Expand description
Wrapper around RangeInclusive<u64>
to implement Ord
and PartialOrd
.
Tuple Fields§
§0: RangeInclusive<u64>
Implementations§
Source§impl OrdRangeInc
impl OrdRangeInc
pub const MIN_SIZE: u64 = 10u64
pub fn new(start: u64, end: u64) -> OrdRangeInc
pub fn new_bound(bound: u64) -> OrdRangeInc
pub fn len(&self) -> u64
pub fn is_empty(&self) -> bool
pub fn start(&self) -> &u64
pub fn end(&self) -> &u64
pub fn contains(&self, item: &u64) -> bool
pub fn is_bound(&self) -> bool
Trait Implementations§
Source§impl Clone for OrdRangeInc
impl Clone for OrdRangeInc
Source§fn clone(&self) -> OrdRangeInc
fn clone(&self) -> OrdRangeInc
Returns a copy 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 Debug for OrdRangeInc
impl Debug for OrdRangeInc
Source§impl<'de> Deserialize<'de> for OrdRangeInc
impl<'de> Deserialize<'de> for OrdRangeInc
Source§fn deserialize<D>(
deserializer: D,
) -> Result<OrdRangeInc, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<OrdRangeInc, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<RangeInclusive<u64>> for OrdRangeInc
impl From<RangeInclusive<u64>> for OrdRangeInc
Source§fn from(range: RangeInclusive<u64>) -> OrdRangeInc
fn from(range: RangeInclusive<u64>) -> OrdRangeInc
Converts to this type from the input type.
Source§impl Ord for OrdRangeInc
impl Ord for OrdRangeInc
Source§fn cmp(&self, other: &OrdRangeInc) -> Ordering
fn cmp(&self, other: &OrdRangeInc) -> Ordering
1.21.0 · 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 PartialEq for OrdRangeInc
impl PartialEq for OrdRangeInc
Source§impl PartialOrd for OrdRangeInc
impl PartialOrd for OrdRangeInc
Source§impl RangeBounds<u64> for OrdRangeInc
impl RangeBounds<u64> for OrdRangeInc
Source§impl Serialize for OrdRangeInc
impl Serialize for OrdRangeInc
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for OrdRangeInc
Auto Trait Implementations§
impl Freeze for OrdRangeInc
impl RefUnwindSafe for OrdRangeInc
impl Send for OrdRangeInc
impl Sync for OrdRangeInc
impl Unpin for OrdRangeInc
impl UnwindSafe for OrdRangeInc
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.