[][src]Struct postgres::types::Json

pub struct Json<T>(pub T);

A wrapper type to allow arbitrary Serialize/Deserialize types to convert to Postgres JSON values.

Trait Implementations

impl<'a, T> FromSql<'a> for Json<T> where
    T: Deserialize<'a>, 
[src]

default fn from_sql_null(
    ty: &Type
) -> Result<Self, Box<dyn Error + 'static + Send + Sync>>
[src]

Creates a new value of this type from a NULL SQL value. Read more

default fn from_sql_nullable(
    ty: &Type,
    raw: Option<&'a [u8]>
) -> Result<Self, Box<dyn Error + 'static + Send + Sync>>
[src]

A convenience function that delegates to from_sql and from_sql_null depending on the value of raw. Read more

impl<T> ToSql for Json<T> where
    T: Serialize + Debug
[src]

impl<T> Debug for Json<T> where
    T: Debug
[src]

Auto Trait Implementations

impl<T> Send for Json<T> where
    T: Send

impl<T> Sync for Json<T> where
    T: Sync

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

impl<T, U> TryInto 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<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T> FromSqlOwned for T where
    T: FromSql<'a>, 
[src]

impl<T> Same for T

type Output = T

Should always be Self