Module pgx::inoutfuncs
source · [−]Expand description
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
#[derive(Serialize, Deserialize, PostgresType)]
types may implement this trait if they prefer
a textual representation that isn’t JSON
Automatically implemented for #[derive(Serialize, Deserialize, PostgresType)]
types that do
not also have the #[inoutfuncs]
attribute macro
#[derive(Copy, Clone, PostgresType)]
types need to implement this trait to provide the text
input/output functions for that type