Trait pgrx::inoutfuncs::InOutFuncs
source · 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§
sourceconst NULL_ERROR_MESSAGE: Option<&'static str> = None
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§
sourcefn input(input: &CStr) -> Selfwhere
Self: Sized,
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!()
sourcefn output(&self, buffer: &mut StringInfo)
fn output(&self, buffer: &mut StringInfo)
Convert Self into text by writing to the supplied StringInfo buffer