Struct sqlx::postgres::types::PgRange

source ยท
pub struct PgRange<T> {
    pub start: Bound<T>,
    pub end: Bound<T>,
}
Available on crate feature postgres only.

Fieldsยง

ยงstart: Bound<T>ยงend: Bound<T>

Trait Implementationsยง

sourceยง

impl<T> Clone for PgRange<T>where T: Clone,

sourceยง

fn clone(&self) -> PgRange<T>

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<T> Debug for PgRange<T>where T: Debug,

sourceยง

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

Formats the value using the given formatter. Read more
sourceยง

impl<'r, T> Decode<'r, Postgres> for PgRange<T>where T: Type<Postgres> + for<'a> Decode<'a, Postgres>,

sourceยง

fn decode( value: PgValueRef<'r> ) -> Result<PgRange<T>, Box<dyn Error + Sync + Send + 'static, Global>>

Decode a new value of this type using a raw value from the database.
sourceยง

impl<T> Display for PgRange<T>where T: Display,

sourceยง

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

Formats the value using the given formatter. Read more
sourceยง

impl<'q, T> Encode<'q, Postgres> for PgRange<T>where T: Encode<'q, Postgres>,

sourceยง

fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull

Writes the value of self into buf without moving self. Read more
sourceยง

fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere Self: Sized,

Writes the value of self into buf in the expected format for the database.
sourceยง

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

sourceยง

fn size_hint(&self) -> usize

sourceยง

impl<T> From<[Bound<T>; 2]> for PgRange<T>

sourceยง

fn from(v: [Bound<T>; 2]) -> PgRange<T>

Converts to this type from the input type.
sourceยง

impl<T> From<(Bound<T>, Bound<T>)> for PgRange<T>

sourceยง

fn from(v: (Bound<T>, Bound<T>)) -> PgRange<T>

Converts to this type from the input type.
sourceยง

impl<T> From<Range<T>> for PgRange<T>

sourceยง

fn from(v: Range<T>) -> PgRange<T>

Converts to this type from the input type.
sourceยง

impl<T> From<RangeFrom<T>> for PgRange<T>

sourceยง

fn from(v: RangeFrom<T>) -> PgRange<T>

Converts to this type from the input type.
sourceยง

impl<T> From<RangeInclusive<T>> for PgRange<T>

sourceยง

fn from(v: RangeInclusive<T>) -> PgRange<T>

Converts to this type from the input type.
sourceยง

impl<T> From<RangeTo<T>> for PgRange<T>

sourceยง

fn from(v: RangeTo<T>) -> PgRange<T>

Converts to this type from the input type.
sourceยง

impl<T> From<RangeToInclusive<T>> for PgRange<T>

sourceยง

fn from(v: RangeToInclusive<T>) -> PgRange<T>

Converts to this type from the input type.
sourceยง

impl<T> PartialEq<PgRange<T>> for PgRange<T>where T: PartialEq<T>,

sourceยง

fn eq(&self, other: &PgRange<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 ยท sourceยง

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
sourceยง

impl PgHasArrayType for PgRange<BigDecimal>

sourceยง

impl PgHasArrayType for PgRange<Date>

sourceยง

impl<Tz> PgHasArrayType for PgRange<DateTime<Tz>>where Tz: TimeZone,

sourceยง

impl PgHasArrayType for PgRange<Decimal>

sourceยง

impl PgHasArrayType for PgRange<NaiveDate>

sourceยง

impl PgHasArrayType for PgRange<NaiveDateTime>

sourceยง

impl PgHasArrayType for PgRange<OffsetDateTime>

sourceยง

impl PgHasArrayType for PgRange<PrimitiveDateTime>

sourceยง

impl PgHasArrayType for PgRange<i32>

sourceยง

impl PgHasArrayType for PgRange<i64>

sourceยง

impl<T> RangeBounds<T> for PgRange<T>

sourceยง

fn start_bound(&self) -> Bound<&T>

Start index bound. Read more
sourceยง

fn end_bound(&self) -> Bound<&T>

End index bound. Read more
1.35.0 ยท sourceยง

fn contains<U>(&self, item: &U) -> boolwhere T: PartialOrd<U>, U: PartialOrd<T> + ?Sized,

Returns true if item is contained in the range. Read more
sourceยง

impl Type<Postgres> for PgRange<BigDecimal>

sourceยง

fn type_info() -> PgTypeInfo

Returns the canonical SQL type for this Rust type. Read more
sourceยง

fn compatible(ty: &PgTypeInfo) -> bool

Determines if this Rust type is compatible with the given SQL type. Read more
sourceยง

impl Type<Postgres> for PgRange<Date>

sourceยง

fn type_info() -> PgTypeInfo

Returns the canonical SQL type for this Rust type. Read more
sourceยง

fn compatible(ty: &PgTypeInfo) -> bool

Determines if this Rust type is compatible with the given SQL type. Read more
sourceยง

impl<Tz> Type<Postgres> for PgRange<DateTime<Tz>>where Tz: TimeZone,

sourceยง

fn type_info() -> PgTypeInfo

Returns the canonical SQL type for this Rust type. Read more
sourceยง

fn compatible(ty: &PgTypeInfo) -> bool

Determines if this Rust type is compatible with the given SQL type. Read more
sourceยง

impl Type<Postgres> for PgRange<Decimal>

sourceยง

fn type_info() -> PgTypeInfo

Returns the canonical SQL type for this Rust type. Read more
sourceยง

fn compatible(ty: &PgTypeInfo) -> bool

Determines if this Rust type is compatible with the given SQL type. Read more
sourceยง

impl Type<Postgres> for PgRange<NaiveDate>

sourceยง

fn type_info() -> PgTypeInfo

Returns the canonical SQL type for this Rust type. Read more
sourceยง

fn compatible(ty: &PgTypeInfo) -> bool

Determines if this Rust type is compatible with the given SQL type. Read more
sourceยง

impl Type<Postgres> for PgRange<NaiveDateTime>

sourceยง

fn type_info() -> PgTypeInfo

Returns the canonical SQL type for this Rust type. Read more
sourceยง

fn compatible(ty: &PgTypeInfo) -> bool

Determines if this Rust type is compatible with the given SQL type. Read more
sourceยง

impl Type<Postgres> for PgRange<OffsetDateTime>

sourceยง

fn type_info() -> PgTypeInfo

Returns the canonical SQL type for this Rust type. Read more
sourceยง

fn compatible(ty: &PgTypeInfo) -> bool

Determines if this Rust type is compatible with the given SQL type. Read more
sourceยง

impl Type<Postgres> for PgRange<PrimitiveDateTime>

sourceยง

fn type_info() -> PgTypeInfo

Returns the canonical SQL type for this Rust type. Read more
sourceยง

fn compatible(ty: &PgTypeInfo) -> bool

Determines if this Rust type is compatible with the given SQL type. Read more
sourceยง

impl Type<Postgres> for PgRange<i32>

sourceยง

fn type_info() -> PgTypeInfo

Returns the canonical SQL type for this Rust type. Read more
sourceยง

fn compatible(ty: &PgTypeInfo) -> bool

Determines if this Rust type is compatible with the given SQL type. Read more
sourceยง

impl Type<Postgres> for PgRange<i64>

sourceยง

fn type_info() -> PgTypeInfo

Returns the canonical SQL type for this Rust type. Read more
sourceยง

fn compatible(ty: &PgTypeInfo) -> bool

Determines if this Rust type is compatible with the given SQL type. Read more
sourceยง

impl<T> Eq for PgRange<T>where T: Eq,

sourceยง

impl<T> StructuralEq for PgRange<T>

sourceยง

impl<T> StructuralPartialEq for PgRange<T>

Auto Trait Implementationsยง

ยง

impl<T> RefUnwindSafe for PgRange<T>where T: RefUnwindSafe,

ยง

impl<T> Send for PgRange<T>where T: Send,

ยง

impl<T> Sync for PgRange<T>where T: Sync,

ยง

impl<T> Unpin for PgRange<T>where T: Unpin,

ยง

impl<T> UnwindSafe for PgRange<T>where T: UnwindSafe,

Blanket Implementationsยง

sourceยง

impl<T> Any for Twhere T: 'static + ?Sized,

sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
sourceยง

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable ยท sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
sourceยง

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable ยท sourceยง

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
sourceยง

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

sourceยง

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
sourceยง

impl<T> From<T> for T

const: unstable ยท sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

sourceยง

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable ยท sourceยง

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

sourceยง

impl<T> Same<T> for T

ยง

type Output = T

Should always be Self
sourceยง

impl<T> ToOwned for Twhere T: Clone,

ยง

type Owned = T

The resulting type after obtaining ownership.
sourceยง

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
sourceยง

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
sourceยง

impl<T> ToString for Twhere T: Display + ?Sized,

sourceยง

default fn to_string(&self) -> String

Converts the given value to a String. Read more
sourceยง

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

ยง

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable ยท sourceยง

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
sourceยง

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

ยง

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

The type returned in the event of a conversion error.
const: unstable ยท sourceยง

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
ยง

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

ยง

fn vzip(self) -> V