pub struct Range<ST: 'static>(/* private fields */);
Available on crate feature
postgres_backend
only.Expand description
The Range
SQL type.
This wraps another type to represent a SQL range of that type.
§ToSql
impls
(Bound<T>, Bound<T>)
for anyT
which implementsToSql<ST>
.Range<T>
(akastart..end
) for anyT
which implementsToSql<ST>
.RangeInclusive<T>
(akastart..=end
) for anyT
which implementsToSql<ST>
.RangeFrom<T>
(akastart..
) for anyT
which implementsToSql<ST>
.RangeTo<T>
(aka..end
) for anyT
which implementsToSql<ST>
.RangeToInclusive<T>
(aka..=end
) for anyT
which implementsToSql<ST>
.
§FromSql
impls
(Bound<T>, Bound<T>)
for anyT
which implementsFromSql<ST>
.
Trait Implementations§
Source§impl<'a, ST: 'static, T> AsExpression<Range<ST>> for &'a (Bound<T>, Bound<T>)
impl<'a, ST: 'static, T> AsExpression<Range<ST>> for &'a (Bound<T>, Bound<T>)
Source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
Source§impl<'a, ST: 'static, T> AsExpression<Range<ST>> for &'a Range<T>
impl<'a, ST: 'static, T> AsExpression<Range<ST>> for &'a Range<T>
Source§type Expression = Bound<Range<ST>, &'a Range<T>>
type Expression = Bound<Range<ST>, &'a Range<T>>
The expression being returned
Source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
Source§impl<'a, ST: 'static, T> AsExpression<Range<ST>> for &'a RangeFrom<T>
impl<'a, ST: 'static, T> AsExpression<Range<ST>> for &'a RangeFrom<T>
Source§type Expression = Bound<Range<ST>, &'a RangeFrom<T>>
type Expression = Bound<Range<ST>, &'a RangeFrom<T>>
The expression being returned
Source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
Source§impl<'a, ST: 'static, T> AsExpression<Range<ST>> for &'a RangeInclusive<T>
impl<'a, ST: 'static, T> AsExpression<Range<ST>> for &'a RangeInclusive<T>
Source§type Expression = Bound<Range<ST>, &'a RangeInclusive<T>>
type Expression = Bound<Range<ST>, &'a RangeInclusive<T>>
The expression being returned
Source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
Source§impl<'a, ST: 'static, T> AsExpression<Range<ST>> for &'a RangeTo<T>
impl<'a, ST: 'static, T> AsExpression<Range<ST>> for &'a RangeTo<T>
Source§type Expression = Bound<Range<ST>, &'a RangeTo<T>>
type Expression = Bound<Range<ST>, &'a RangeTo<T>>
The expression being returned
Source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
Source§impl<'a, ST: 'static, T> AsExpression<Range<ST>> for &'a RangeToInclusive<T>
impl<'a, ST: 'static, T> AsExpression<Range<ST>> for &'a RangeToInclusive<T>
Source§type Expression = Bound<Range<ST>, &'a RangeToInclusive<T>>
type Expression = Bound<Range<ST>, &'a RangeToInclusive<T>>
The expression being returned
Source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
Source§impl<'a, ST: 'static, T> AsExpression<Range<ST>> for (Bound<T>, Bound<T>)
impl<'a, ST: 'static, T> AsExpression<Range<ST>> for (Bound<T>, Bound<T>)
Source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
Source§impl<'a, ST: 'static, T> AsExpression<Range<ST>> for Range<T>
impl<'a, ST: 'static, T> AsExpression<Range<ST>> for Range<T>
Source§type Expression = Bound<Range<ST>, Range<T>>
type Expression = Bound<Range<ST>, Range<T>>
The expression being returned
Source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
Source§impl<'a, ST: 'static, T> AsExpression<Range<ST>> for RangeFrom<T>
impl<'a, ST: 'static, T> AsExpression<Range<ST>> for RangeFrom<T>
Source§type Expression = Bound<Range<ST>, RangeFrom<T>>
type Expression = Bound<Range<ST>, RangeFrom<T>>
The expression being returned
Source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
Source§impl<'a, ST: 'static, T> AsExpression<Range<ST>> for RangeInclusive<T>
impl<'a, ST: 'static, T> AsExpression<Range<ST>> for RangeInclusive<T>
Source§type Expression = Bound<Range<ST>, RangeInclusive<T>>
type Expression = Bound<Range<ST>, RangeInclusive<T>>
The expression being returned
Source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
Source§impl<'a, ST: 'static, T> AsExpression<Range<ST>> for RangeTo<T>
impl<'a, ST: 'static, T> AsExpression<Range<ST>> for RangeTo<T>
Source§type Expression = Bound<Range<ST>, RangeTo<T>>
type Expression = Bound<Range<ST>, RangeTo<T>>
The expression being returned
Source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
Source§impl<'a, ST: 'static, T> AsExpression<Range<ST>> for RangeToInclusive<T>
impl<'a, ST: 'static, T> AsExpression<Range<ST>> for RangeToInclusive<T>
Source§type Expression = Bound<Range<ST>, RangeToInclusive<T>>
type Expression = Bound<Range<ST>, RangeToInclusive<T>>
The expression being returned
Source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
Source§impl HasSqlType<Range<BigInt>> for Pg
impl HasSqlType<Range<BigInt>> for Pg
Source§fn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata
fn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata
Fetch the metadata for the given type Read more
Source§impl HasSqlType<Range<Date>> for Pg
impl HasSqlType<Range<Date>> for Pg
Source§fn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata
fn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata
Fetch the metadata for the given type Read more
Source§impl HasSqlType<Range<Integer>> for Pg
impl HasSqlType<Range<Integer>> for Pg
Source§fn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata
fn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata
Fetch the metadata for the given type Read more
Source§impl HasSqlType<Range<Numeric>> for Pg
impl HasSqlType<Range<Numeric>> for Pg
Source§fn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata
fn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata
Fetch the metadata for the given type Read more
Source§impl HasSqlType<Range<Timestamp>> for Pg
impl HasSqlType<Range<Timestamp>> for Pg
Source§fn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata
fn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata
Fetch the metadata for the given type Read more
Source§impl HasSqlType<Range<Timestamptz>> for Pg
impl HasSqlType<Range<Timestamptz>> for Pg
Source§fn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata
fn metadata(_: &mut Self::MetadataLookup) -> PgTypeMetadata
Fetch the metadata for the given type Read more
Source§impl<ST: 'static + QueryId> QueryId for Range<ST>
impl<ST: 'static + QueryId> QueryId for Range<ST>
impl<ST: Copy + 'static> Copy for Range<ST>
impl<ST: 'static> SingleValue for Range<ST>
Auto Trait Implementations§
impl<ST> Freeze for Range<ST>where
ST: Freeze,
impl<ST> RefUnwindSafe for Range<ST>where
ST: RefUnwindSafe,
impl<ST> Send for Range<ST>where
ST: Send,
impl<ST> Sync for Range<ST>where
ST: Sync,
impl<ST> Unpin for Range<ST>where
ST: Unpin,
impl<ST> UnwindSafe for Range<ST>where
ST: 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§impl<ST, U, DB> CompatibleType<U, DB> for ST
impl<ST, U, DB> CompatibleType<U, DB> for ST
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoNotNullable for T
impl<T> IntoNotNullable for T
Source§type NotNullable = T
type NotNullable = T
The not nullable representation of this type. Read more