pub trait ToBinary {
// Required method
fn to_binary_with_type(&self, ty: &DataType) -> Result<Bytes, ToBinaryError>;
}
Expand description
Converts ScalarRef
to pgwire “BINARY” format.
[postgres_types::ToSql
] has similar functionality, and most of our types implement
that trait and forward ToBinary
to it directly.