Struct sqlx::postgres::types::PgInterval [−][src]
postgres
only.Fields
months: i32
days: i32
microseconds: i64
Trait Implementations
pub fn decode(
value: PgValueRef<'de>
) -> Result<PgInterval, Box<dyn Error + Sync + Send + 'static, Global>>
pub fn decode(
value: PgValueRef<'de>
) -> Result<PgInterval, Box<dyn Error + Sync + Send + 'static, Global>>
Decode a new value of this type using a raw value from the database.
Writes the value of self
into buf
without moving self
. Read more
Writes the value of self
into buf
in the expected format for the database.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Convert a chrono::Duration
to a PgInterval
.
This returns an error if there is a loss of precision using nanoseconds or if there is a nanosecond overflow.
Convert a std::time::Duration
to a PgInterval
This returns an error if there is a loss of precision using nanoseconds or if there is a microsecond overflow.
Convert a time::Duration
to a PgInterval
.
This returns an error if there is a loss of precision using nanoseconds or if there is a microsecond overflow.
Returns the canonical SQL type for this Rust type. Read more
Auto Trait Implementations
impl RefUnwindSafe for PgInterval
impl Send for PgInterval
impl Sync for PgInterval
impl Unpin for PgInterval
impl UnwindSafe for PgInterval
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.