mz_repr::adt::range

Type Alias RangeLowerBound

Source
pub type RangeLowerBound<B> = RangeBound<B, false>;
Expand description

A RangeBound that sorts correctly for use as a lower bound.

Aliased Type§

struct RangeLowerBound<B> {
    pub inclusive: bool,
    pub bound: Option<B>,
}

Fields§

§inclusive: bool§bound: Option<B>

None value represents an infinite bound.

Implementations

Source§

impl<'a, const UPPER: bool> RangeBound<Datum<'a>, UPPER>

Source

pub fn new(d: Datum<'a>, inclusive: bool) -> RangeBound<Datum<'a>, UPPER>

Create a new RangeBound whose value is “infinite” (i.e. None) if d == Datum::Null, otherwise finite (i.e. Some).

There is not a corresponding generic implementation of this because genericizing how to express infinite bounds is less clear.

Trait Implementations

Source§

impl<B: Clone, const UPPER: bool> Clone for RangeBound<B, UPPER>

Source§

fn clone(&self) -> RangeBound<B, UPPER>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<B: Debug, const UPPER: bool> Debug for RangeBound<B, UPPER>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<const UPPER: bool, D: Display> Display for RangeBound<D, UPPER>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<B: Hash, const UPPER: bool> Hash for RangeBound<B, UPPER>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<const UPPER: bool, D: Ord> Ord for RangeBound<D, UPPER>

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<B: PartialEq, const UPPER: bool> PartialEq for RangeBound<B, UPPER>

Source§

fn eq(&self, other: &RangeBound<B, UPPER>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<const UPPER: bool, D: PartialOrd + Ord> PartialOrd for RangeBound<D, UPPER>

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<B: Copy, const UPPER: bool> Copy for RangeBound<B, UPPER>

Source§

impl<B: Eq, const UPPER: bool> Eq for RangeBound<B, UPPER>

Source§

impl<B, const UPPER: bool> StructuralPartialEq for RangeBound<B, UPPER>