pub struct CanonicalRange<I = RangeSubtype> { /* private fields */ }Implementations§
Source§impl CanonicalRange
impl CanonicalRange
Sourcepub fn cmp_with_control(
&self,
other: &Self,
control: &ProductionControl<'_>,
) -> Result<Ordering>
pub fn cmp_with_control( &self, other: &Self, control: &ProductionControl<'_>, ) -> Result<Ordering>
Compare admitted ranges of one subtype in PostgreSQL B-tree order, retaining the caller’s comparison workspace and cancellation boundary.
Source§impl CanonicalRange
impl CanonicalRange
pub const fn subtype(&self) -> RangeSubtype
Source§impl<I> CanonicalRange<I>
impl<I> CanonicalRange<I>
Source§impl CanonicalRange
impl CanonicalRange
pub fn overlaps(&self, other: &Self) -> bool
pub fn adjacent(&self, other: &Self) -> bool
pub fn contains_range(&self, other: &Self) -> bool
pub fn contains_value(&self, value: &Value) -> bool
Sourcepub fn merge_cover(&self, other: &Self) -> Self
pub fn merge_cover(&self, other: &Self) -> Self
Smallest range containing both operands. Unlike union, PostgreSQL’s
range_merge also spans a gap between disjoint ranges.
pub fn to_text(&self) -> String
Trait Implementations§
Source§impl<I: Clone> Clone for CanonicalRange<I>
impl<I: Clone> Clone for CanonicalRange<I>
Source§impl<I: Debug> Debug for CanonicalRange<I>
impl<I: Debug> Debug for CanonicalRange<I>
impl<I: Eq> Eq for CanonicalRange<I>
Source§impl<I: PartialEq> PartialEq for CanonicalRange<I>
impl<I: PartialEq> PartialEq for CanonicalRange<I>
impl<I: PartialEq> StructuralPartialEq for CanonicalRange<I>
Auto Trait Implementations§
impl<I> Freeze for CanonicalRange<I>where
I: Freeze,
impl<I> RefUnwindSafe for CanonicalRange<I>where
I: RefUnwindSafe,
impl<I> Send for CanonicalRange<I>where
I: Send,
impl<I> Sync for CanonicalRange<I>where
I: Sync,
impl<I> Unpin for CanonicalRange<I>where
I: Unpin,
impl<I> UnsafeUnpin for CanonicalRange<I>where
I: UnsafeUnpin,
impl<I> UnwindSafe for CanonicalRange<I>where
I: 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,
impl<T> ErasedDestructor for Twhere
T: 'static,
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