[][src]Module pgx::inoutfuncs

Helper trait for the #[derive(PostgresType)] proc macro for overriding custom Postgres type input/output functions.

The default implementations use serde_json to serialize a custom type to human-readable strings, and serde_cbor to serialize internally as a varlena * for storage on disk.

Traits

InOutFuncs

#[derive(Serialize, Deserialize, PostgresType)] types may implement this trait if they prefer a textual representation that isn't JSON

JsonInOutFuncs

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

PgVarlenaInOutFuncs

#[derive(Copy, Clone, PostgresType)] types need to implement this trait to provide the text input/output functions for that type