[][src]Trait pgx::inoutfuncs::JsonInOutFuncs

pub trait JsonInOutFuncs<'de>: Deserialize<'de> + Serialize {
    fn input(input: &'de CStr) -> Self { ... }
fn output(&self, buffer: &mut StringInfo)
    where
        Self: Serialize
, { ... } }

Automatically implemented for #[derive(Serialize, Deserialize, PostgresType)] types that do not also have the #[inoutfuncs] attribute macro

Provided methods

fn input(input: &'de CStr) -> Self

Uses serde_json to deserialize the input, which is assumed to be JSON

fn output(&self, buffer: &mut StringInfo) where
    Self: Serialize

Users serde_json to serialize Self into JSON

Loading content...

Implementors

Loading content...