pub trait InOutFuncs {
    const NULL_ERROR_MESSAGE: Option<&'static str> = None;

    // Required methods
    fn input(input: &CStr) -> Self
       where Self: Sized;
    fn output(&self, buffer: &mut StringInfo);
}
Expand description

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

Provided Associated Constants§

source

const NULL_ERROR_MESSAGE: Option<&'static str> = None

If PostgreSQL calls the conversion function with NULL as an argument, what error message should be generated?

Required Methods§

source

fn input(input: &CStr) -> Selfwhere Self: Sized,

Given a string representation of Self, parse it into Self.

It is expected that malformed input will raise an error!() or panic!()

source

fn output(&self, buffer: &mut StringInfo)

Convert Self into text by writing to the supplied StringInfo buffer

Implementors§