risingwave_common::types::to_binary

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§