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§
§impl<'q, T> Encode<'q, Postgres> for PgRange<T>
impl<'q, T> Encode<'q, Postgres> for PgRange<T>
§fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
source§fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
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.fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
§impl<T> From<RangeInclusive<T>> for PgRange<T>
impl<T> From<RangeInclusive<T>> for PgRange<T>
§fn from(v: RangeInclusive<T>) -> PgRange<T>
fn from(v: RangeInclusive<T>) -> PgRange<T>
Converts to this type from the input type.
§impl<T> From<RangeToInclusive<T>> for PgRange<T>
impl<T> From<RangeToInclusive<T>> for PgRange<T>
§fn from(v: RangeToInclusive<T>) -> PgRange<T>
fn from(v: RangeToInclusive<T>) -> PgRange<T>
Converts to this type from the input type.
§impl<T> PartialEq for PgRange<T>where
T: PartialEq,
impl<T> PartialEq for PgRange<T>where
T: PartialEq,
§impl PgHasArrayType for PgRange<Date>
impl PgHasArrayType for PgRange<Date>
fn array_type_info() -> PgTypeInfo
fn array_compatible(ty: &PgTypeInfo) -> bool
§impl<Tz> PgHasArrayType for PgRange<DateTime<Tz>>where
Tz: TimeZone,
impl<Tz> PgHasArrayType for PgRange<DateTime<Tz>>where
Tz: TimeZone,
fn array_type_info() -> PgTypeInfo
fn array_compatible(ty: &PgTypeInfo) -> bool
§impl PgHasArrayType for PgRange<Decimal>
impl PgHasArrayType for PgRange<Decimal>
fn array_type_info() -> PgTypeInfo
fn array_compatible(ty: &PgTypeInfo) -> bool
§impl PgHasArrayType for PgRange<NaiveDate>
impl PgHasArrayType for PgRange<NaiveDate>
fn array_type_info() -> PgTypeInfo
fn array_compatible(ty: &PgTypeInfo) -> bool
§impl PgHasArrayType for PgRange<NaiveDateTime>
impl PgHasArrayType for PgRange<NaiveDateTime>
fn array_type_info() -> PgTypeInfo
fn array_compatible(ty: &PgTypeInfo) -> bool
§impl PgHasArrayType for PgRange<OffsetDateTime>
impl PgHasArrayType for PgRange<OffsetDateTime>
fn array_type_info() -> PgTypeInfo
fn array_compatible(ty: &PgTypeInfo) -> bool
§impl PgHasArrayType for PgRange<PrimitiveDateTime>
impl PgHasArrayType for PgRange<PrimitiveDateTime>
fn array_type_info() -> PgTypeInfo
fn array_compatible(ty: &PgTypeInfo) -> bool
§impl PgHasArrayType for PgRange<i32>
impl PgHasArrayType for PgRange<i32>
fn array_type_info() -> PgTypeInfo
fn array_compatible(ty: &PgTypeInfo) -> bool
§impl PgHasArrayType for PgRange<i64>
impl PgHasArrayType for PgRange<i64>
fn array_type_info() -> PgTypeInfo
fn array_compatible(ty: &PgTypeInfo) -> bool
§impl<T> RangeBounds<T> for PgRange<T>
impl<T> RangeBounds<T> for PgRange<T>
§impl Type<Postgres> for PgRange<Date>
impl Type<Postgres> for PgRange<Date>
§fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
§fn compatible(ty: &PgTypeInfo) -> bool
fn compatible(ty: &PgTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
§impl<Tz> Type<Postgres> for PgRange<DateTime<Tz>>where
Tz: TimeZone,
impl<Tz> Type<Postgres> for PgRange<DateTime<Tz>>where
Tz: TimeZone,
§fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
§fn compatible(ty: &PgTypeInfo) -> bool
fn compatible(ty: &PgTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
§impl Type<Postgres> for PgRange<Decimal>
impl Type<Postgres> for PgRange<Decimal>
§fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
§fn compatible(ty: &PgTypeInfo) -> bool
fn compatible(ty: &PgTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
§impl Type<Postgres> for PgRange<NaiveDate>
impl Type<Postgres> for PgRange<NaiveDate>
§fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
§fn compatible(ty: &PgTypeInfo) -> bool
fn compatible(ty: &PgTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
§impl Type<Postgres> for PgRange<NaiveDateTime>
impl Type<Postgres> for PgRange<NaiveDateTime>
§fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
§fn compatible(ty: &PgTypeInfo) -> bool
fn compatible(ty: &PgTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
§impl Type<Postgres> for PgRange<OffsetDateTime>
impl Type<Postgres> for PgRange<OffsetDateTime>
§fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
§fn compatible(ty: &PgTypeInfo) -> bool
fn compatible(ty: &PgTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
§impl Type<Postgres> for PgRange<PrimitiveDateTime>
impl Type<Postgres> for PgRange<PrimitiveDateTime>
§fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
§fn compatible(ty: &PgTypeInfo) -> bool
fn compatible(ty: &PgTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
§impl Type<Postgres> for PgRange<i32>
impl Type<Postgres> for PgRange<i32>
§fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
§fn compatible(ty: &PgTypeInfo) -> bool
fn compatible(ty: &PgTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
§impl Type<Postgres> for PgRange<i64>
impl Type<Postgres> for PgRange<i64>
§fn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
§fn compatible(ty: &PgTypeInfo) -> bool
fn compatible(ty: &PgTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
impl<T> Eq for PgRange<T>where
T: Eq,
impl<T> StructuralEq for PgRange<T>
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> 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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.