[][src]Struct postgres_range::RangeBound

pub struct RangeBound<S: BoundSided, T> {
    pub value: T,
    pub type_: BoundType,
    // some fields omitted
}

Represents a one-sided bound.

The side is determined by the S phantom parameter.

Fields

value: T

The value of the bound.

type_: BoundType

The type of the bound.

Methods

impl<S, T> RangeBound<S, T> where
    S: BoundSided,
    T: PartialOrd
[src]

pub fn new(value: T, type_: BoundType) -> RangeBound<S, T>[src]

Constructs a new range bound

pub fn in_bounds(&self, value: &T) -> bool[src]

Determines if a value lies within the range specified by this bound.

Trait Implementations

impl<S, T> Copy for RangeBound<S, T> where
    S: BoundSided,
    T: Copy
[src]

impl<S, T> PartialEq<RangeBound<S, T>> for RangeBound<S, T> where
    S: BoundSided,
    T: PartialEq
[src]

impl<S, T> Clone for RangeBound<S, T> where
    S: BoundSided,
    T: Clone
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<S, T> Ord for RangeBound<S, T> where
    S: BoundSided,
    T: Ord
[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl<S, T> Eq for RangeBound<S, T> where
    S: BoundSided,
    T: Eq
[src]

impl<S, T> PartialOrd<RangeBound<S, T>> for RangeBound<S, T> where
    S: BoundSided,
    T: PartialOrd
[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<S, T> Display for RangeBound<S, T> where
    S: BoundSided,
    T: Display
[src]

impl<S, T> Debug for RangeBound<S, T> where
    S: BoundSided,
    T: Debug
[src]

Auto Trait Implementations

impl<S, T> Send for RangeBound<S, T> where
    S: Send,
    T: Send

impl<S, T> Sync for RangeBound<S, T> where
    S: Sync,
    T: Sync

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self