Struct mz_repr::adt::range::RangeBound
source · pub struct RangeBound<B, const UPPER: bool = false> {
pub inclusive: bool,
pub bound: Option<B>,
}
Expand description
Represents a terminal point of a range.
Fields§
§inclusive: bool
§bound: Option<B>
None value represents an infinite bound.
Implementations§
source§impl<'a, const UPPER: bool, B: Copy + Ord + PartialOrd + Display + Debug> RangeBound<B, UPPER>
impl<'a, const UPPER: bool, B: Copy + Ord + PartialOrd + Display + Debug> RangeBound<B, UPPER>
sourcefn elem_cmp<T: RangeOps<'a>>(&self, elem: &T) -> Ordering
fn elem_cmp<T: RangeOps<'a>>(&self, elem: &T) -> Ordering
Determines where elem
lies in relation to the range bound.
§Panics
- If
self.bound.datum()
is not convertible toT
.
sourcefn satisfied_by<T: RangeOps<'a>>(&self, elem: &T) -> bool
fn satisfied_by<T: RangeOps<'a>>(&self, elem: &T) -> bool
Does elem
satisfy this bound?
fn range_bound_cmp<const OTHER_UPPER: bool>( &self, other: &RangeBound<B, OTHER_UPPER>, ) -> Ordering
source§impl<'a, const UPPER: bool> RangeBound<Datum<'a>, UPPER>
impl<'a, const UPPER: bool> RangeBound<Datum<'a>, UPPER>
sourcepub fn new(d: Datum<'a>, inclusive: bool) -> RangeBound<Datum<'a>, UPPER>
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.
sourcefn canonicalize(&mut self) -> Result<(), InvalidRangeError>
fn canonicalize(&mut self) -> Result<(), InvalidRangeError>
Rewrite the bounds to the consistent format. This is absolutely necessary to perform the correct equality/comparison operations on types.
sourcefn canonicalize_inner<T: RangeOps<'a>>(
&mut self,
d: Datum<'a>,
) -> Result<(), InvalidRangeError>
fn canonicalize_inner<T: RangeOps<'a>>( &mut self, d: Datum<'a>, ) -> Result<(), InvalidRangeError>
Canonicalize self
’s representation for types that have discrete steps
between values.
Continuous values (e.g. timestamps, numeric) must not be canonicalized.
Trait Implementations§
source§impl<B: Clone, const UPPER: bool> Clone for RangeBound<B, UPPER>
impl<B: Clone, const UPPER: bool> Clone for RangeBound<B, UPPER>
source§fn clone(&self) -> RangeBound<B, UPPER>
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)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<const UPPER: bool, D: Ord> Ord for RangeBound<D, UPPER>
impl<const UPPER: bool, D: Ord> Ord for RangeBound<D, UPPER>
source§impl<const UPPER: bool, D: PartialOrd + Ord> PartialOrd for RangeBound<D, UPPER>
impl<const UPPER: bool, D: PartialOrd + Ord> PartialOrd for RangeBound<D, UPPER>
impl<B: Copy, const UPPER: bool> Copy for RangeBound<B, UPPER>
impl<B: Eq, const UPPER: bool> Eq for RangeBound<B, UPPER>
impl<B, const UPPER: bool> StructuralPartialEq for RangeBound<B, UPPER>
Auto Trait Implementations§
impl<B, const UPPER: bool> Freeze for RangeBound<B, UPPER>where
B: Freeze,
impl<B, const UPPER: bool> RefUnwindSafe for RangeBound<B, UPPER>where
B: RefUnwindSafe,
impl<B, const UPPER: bool> Send for RangeBound<B, UPPER>where
B: Send,
impl<B, const UPPER: bool> Sync for RangeBound<B, UPPER>where
B: Sync,
impl<B, const UPPER: bool> Unpin for RangeBound<B, UPPER>where
B: Unpin,
impl<B, const UPPER: bool> UnwindSafe for RangeBound<B, UPPER>where
B: 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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<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.source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
source§impl<T, U> OverrideFrom<Option<&T>> for Uwhere
U: OverrideFrom<T>,
impl<T, U> OverrideFrom<Option<&T>> for Uwhere
U: OverrideFrom<T>,
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> PreferredContainer for T
impl<T> PreferredContainer for T
source§impl<T> ProgressEventTimestamp for T
impl<T> ProgressEventTimestamp for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
See
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
See
RustType::into_proto
.source§impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
source§fn plus_equals(&mut self, rhs: &&'a S)
fn plus_equals(&mut self, rhs: &&'a S)
The method of
std::ops::AddAssign
, for types that do not implement AddAssign
.