Expand description
Represents a moment of time, in a specified timezone.
Warning
PgTimeTz
provides TIMETZ
and is supported only for reading from legacy databases.
PostgreSQL recommends to use TIMESTAMPTZ
instead.
Fields
time: Time
offset: Offset
Trait Implementations
sourceimpl<'r> Decode<'r, Postgres> for PgTimeTz<NaiveTime, FixedOffset>
impl<'r> Decode<'r, Postgres> for PgTimeTz<NaiveTime, FixedOffset>
sourcefn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
sourceimpl<'r> Decode<'r, Postgres> for PgTimeTz<Time, UtcOffset>
impl<'r> Decode<'r, Postgres> for PgTimeTz<Time, UtcOffset>
sourcefn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
sourceimpl Encode<'_, Postgres> for PgTimeTz<NaiveTime, FixedOffset>
impl Encode<'_, Postgres> for PgTimeTz<NaiveTime, FixedOffset>
sourcefn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
Writes the value of self
into buf
without moving self
. Read more
fn size_hint(&self) -> usize
sourcefn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull where
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull where
Self: Sized,
Writes the value of self
into buf
in the expected format for the database.
fn produces(&self) -> Option<DB::TypeInfo>
sourceimpl Encode<'_, Postgres> for PgTimeTz<Time, UtcOffset>
impl Encode<'_, Postgres> for PgTimeTz<Time, UtcOffset>
sourcefn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
Writes the value of self
into buf
without moving self
. Read more
fn size_hint(&self) -> usize
sourcefn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull where
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull where
Self: Sized,
Writes the value of self
into buf
in the expected format for the database.
fn produces(&self) -> Option<DB::TypeInfo>
sourceimpl<Time: PartialEq, Offset: PartialEq> PartialEq<PgTimeTz<Time, Offset>> for PgTimeTz<Time, Offset>
impl<Time: PartialEq, Offset: PartialEq> PartialEq<PgTimeTz<Time, Offset>> for PgTimeTz<Time, Offset>
sourceimpl Type<Postgres> for PgTimeTz<NaiveTime, FixedOffset>
impl Type<Postgres> for PgTimeTz<NaiveTime, FixedOffset>
sourcefn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
sourcefn compatible(ty: &DB::TypeInfo) -> bool
fn compatible(ty: &DB::TypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
sourceimpl Type<Postgres> for PgTimeTz<Time, UtcOffset>
impl Type<Postgres> for PgTimeTz<Time, UtcOffset>
sourcefn type_info() -> PgTypeInfo
fn type_info() -> PgTypeInfo
Returns the canonical SQL type for this Rust type. Read more
sourcefn compatible(ty: &DB::TypeInfo) -> bool
fn compatible(ty: &DB::TypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
impl<Time: Copy, Offset: Copy> Copy for PgTimeTz<Time, Offset>
impl<Time, Offset> StructuralPartialEq for PgTimeTz<Time, Offset>
Auto Trait Implementations
impl<Time, Offset> RefUnwindSafe for PgTimeTz<Time, Offset> where
Offset: RefUnwindSafe,
Time: RefUnwindSafe,
impl<Time, Offset> Send for PgTimeTz<Time, Offset> where
Offset: Send,
Time: Send,
impl<Time, Offset> Sync for PgTimeTz<Time, Offset> where
Offset: Sync,
Time: Sync,
impl<Time, Offset> Unpin for PgTimeTz<Time, Offset> where
Offset: Unpin,
Time: Unpin,
impl<Time, Offset> UnwindSafe for PgTimeTz<Time, Offset> where
Offset: UnwindSafe,
Time: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more