[][src]Struct sqlx::postgres::types::PgInterval

pub struct PgInterval {
    pub months: i32,
    pub days: i32,
    pub microseconds: i64,
}
This is supported on crate feature postgres only.

Fields

months: i32
This is supported on crate feature postgres only.
days: i32
This is supported on crate feature postgres only.
microseconds: i64
This is supported on crate feature postgres only.

Trait Implementations

impl Clone for PgInterval[src]

impl Debug for PgInterval[src]

impl<'de> Decode<'de, Postgres> for PgInterval[src]

impl<'_> Encode<'_, Postgres> for PgInterval[src]

impl Eq for PgInterval[src]

impl PartialEq<PgInterval> for PgInterval[src]

impl StructuralEq for PgInterval[src]

impl StructuralPartialEq for PgInterval[src]

impl TryFrom<Duration> for PgInterval[src]

type Error = Box<dyn Error + 'static + Sync + Send>

The type returned in the event of a conversion error.

fn try_from(
    value: Duration
) -> Result<PgInterval, Box<dyn Error + 'static + Sync + Send>>
[src]

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.

impl TryFrom<Duration> for PgInterval[src]

type Error = Box<dyn Error + 'static + Sync + Send>

The type returned in the event of a conversion error.

fn try_from(
    value: Duration
) -> Result<PgInterval, Box<dyn Error + 'static + Sync + Send>>
[src]

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 microsecond or nanosecond overflow.

impl TryFrom<Duration> for PgInterval[src]

type Error = Box<dyn Error + 'static + Sync + Send>

The type returned in the event of a conversion error.

fn try_from(
    value: Duration
) -> Result<PgInterval, Box<dyn Error + 'static + Sync + Send>>
[src]

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.

impl Type<Postgres> for PgInterval[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,