Struct tokio_postgres::types::Json [−][src]
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]
impl<'a, T> FromSql<'a> for Json<T> where
T: Deserialize<'a>,
[src]pub fn from_sql(
ty: &Type,
raw: &'a [u8]
) -> Result<Json<T>, Box<dyn Error + 'static + Sync + Send, Global>>
[src]
ty: &Type,
raw: &'a [u8]
) -> Result<Json<T>, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool
[src]
pub fn from_sql_null(
ty: &Type
) -> Result<Self, Box<dyn Error + 'static + Sync + Send, Global>>
[src]
ty: &Type
) -> Result<Self, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn from_sql_nullable(
ty: &Type,
raw: Option<&'a [u8]>
) -> Result<Self, Box<dyn Error + 'static + Sync + Send, Global>>
[src]
ty: &Type,
raw: Option<&'a [u8]>
) -> Result<Self, Box<dyn Error + 'static + Sync + Send, Global>>
impl<T> StructuralEq for Json<T>
[src]
impl<T> StructuralEq for Json<T>
[src]impl<T> StructuralPartialEq for Json<T>
[src]
impl<T> StructuralPartialEq for Json<T>
[src]Auto Trait Implementations
impl<T> RefUnwindSafe for Json<T> where
T: RefUnwindSafe,
impl<T> RefUnwindSafe for Json<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Json<T> where
T: UnwindSafe,
impl<T> UnwindSafe for Json<T> where
T: UnwindSafe,
Blanket Implementations
impl<T> BorrowToSql for T where
T: ToSql,
[src]
impl<T> BorrowToSql for T where
T: ToSql,
[src]pub fn borrow_to_sql(&self) -> &dyn ToSql
[src]
impl<T> FromSqlOwned for T where
T: for<'a> FromSql<'a>,
[src]
impl<T> FromSqlOwned for T where
T: for<'a> FromSql<'a>,
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,