Skip to main content

Row

Trait Row 

Source
pub trait Row: Send {
    // Required method
    fn write<'life0, 'async_trait>(
        self,
        writer: Pin<&'life0 mut BinaryCopyInWriter>,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Binary row serialization for PostgreSQL COPY protocol.

Each implementation handles a specific tuple arity, writing fields in binary format to match the table schema. The trait enables Streamable to work with any row shape.

§Safety

Field order and types must exactly match the table schema defined by the corresponding Schema implementation.

Required Methods§

Source

fn write<'life0, 'async_trait>( self, writer: Pin<&'life0 mut BinaryCopyInWriter>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Writes this row to the binary COPY stream.

Implementations on Foreign Types§

Source§

impl Row for (i16, i16, f32)

Row format for transition probabilities.

Source§

fn write<'life0, 'async_trait>( self, writer: Pin<&'life0 mut BinaryCopyInWriter>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl Row for (i32, f32)

Row format for triangular index → distance mappings.

Source§

fn write<'life0, 'async_trait>( self, writer: Pin<&'life0 mut BinaryCopyInWriter>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl Row for (i64, i16)

Row format for isomorphism → abstraction mappings.

Source§

fn write<'life0, 'async_trait>( self, writer: Pin<&'life0 mut BinaryCopyInWriter>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl Row for (i64, i16, i64, i64, f32, f32, f32, i32)

Row format for blueprint strategies.

Source§

fn write<'life0, 'async_trait>( self, writer: Pin<&'life0 mut BinaryCopyInWriter>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§