Trait ToBinary

Source
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.

Required Methods§

Implementations on Foreign Types§

Source§

impl ToBinary for &str

Source§

impl ToBinary for &[u8]

Source§

impl ToBinary for bool

Source§

impl ToBinary for i16

Source§

impl ToBinary for i32

Source§

impl ToBinary for i64

Implementors§