This is supported on crate feature
postgres
only.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<'_> 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
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
Writes the value of self
into buf
in the expected format for the database.
fn produces(&self) -> Option<<DB as Database>::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
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNull
Writes the value of self
into buf
in the expected format for the database.
fn produces(&self) -> Option<<DB as Database>::TypeInfo>
sourceimpl<Time, Offset> PartialEq<PgTimeTz<Time, Offset>> for PgTimeTz<Time, Offset> where
Time: PartialEq<Time>,
Offset: PartialEq<Offset>,
impl<Time, Offset> PartialEq<PgTimeTz<Time, Offset>> for PgTimeTz<Time, Offset> where
Time: PartialEq<Time>,
Offset: PartialEq<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
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
impl<Time, Offset> Copy for PgTimeTz<Time, Offset> where
Time: Copy,
Offset: Copy,
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more