pub struct PgTimeTz<Time = Time, Offset = UtcOffset> {
pub time: Time,
pub offset: Offset,
}
Available 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§
source§impl Encode<'_, Postgres> for PgTimeTz
impl Encode<'_, Postgres> for PgTimeTz
source§fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
fn size_hint(&self) -> usize
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>
source§impl Encode<'_, Postgres> for PgTimeTz<NaiveTime, FixedOffset>
impl Encode<'_, Postgres> for PgTimeTz<NaiveTime, FixedOffset>
source§fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
fn size_hint(&self) -> usize
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>
source§impl<Time, Offset> PartialEq for PgTimeTz<Time, Offset>
impl<Time, Offset> PartialEq for PgTimeTz<Time, Offset>
source§impl<Time, Offset> PgHasArrayType for PgTimeTz<Time, Offset>
impl<Time, Offset> PgHasArrayType for PgTimeTz<Time, Offset>
fn array_type_info() -> PgTypeInfo
fn array_compatible(ty: &PgTypeInfo) -> bool
impl<Time, Offset> Copy for PgTimeTz<Time, Offset>
impl<Time, Offset> StructuralPartialEq for PgTimeTz<Time, Offset>
Auto Trait Implementations§
impl<Time, Offset> Freeze for PgTimeTz<Time, Offset>
impl<Time, Offset> RefUnwindSafe for PgTimeTz<Time, Offset>where
Offset: RefUnwindSafe,
Time: RefUnwindSafe,
impl<Time, Offset> Send for PgTimeTz<Time, Offset>
impl<Time, Offset> Sync for PgTimeTz<Time, Offset>
impl<Time, Offset> Unpin for PgTimeTz<Time, Offset>
impl<Time, Offset> UnwindSafe for PgTimeTz<Time, Offset>where
Offset: UnwindSafe,
Time: 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