pub trait RowEncoder {
type Output: SerTo<Vec<u8>>;
// Required methods
fn encode_cols(
&self,
row: impl Row,
col_indices: impl Iterator<Item = usize>,
) -> Result<Self::Output>;
fn schema(&self) -> &Schema;
fn col_indices(&self) -> Option<&[usize]>;
// Provided method
fn encode(&self, row: impl Row) -> Result<Self::Output> { ... }
}
Expand description
Encode a row of a relation into
- an object in json
- a message in protobuf
- a record in avro
Required Associated Types§
Required Methods§
fn encode_cols( &self, row: impl Row, col_indices: impl Iterator<Item = usize>, ) -> Result<Self::Output>
fn schema(&self) -> &Schema
fn col_indices(&self) -> Option<&[usize]>
Provided Methods§
Object Safety§
This trait is not object safe.