Skip to main content

RowSink

Trait RowSink 

Source
pub trait RowSink {
    // Required methods
    fn begin_table(&mut self, table: &PlannedTable) -> Result<(), GenerateError>;
    fn write_row(
        &mut self,
        table: &PlannedTable,
        row: &GeneratedRow,
    ) -> Result<(), GenerateError>;
    fn end_table(&mut self, table: &PlannedTable) -> Result<(), GenerateError>;
}
Expand description

A destination for generated rows: notified at each table boundary and given every row in order.

Required Methods§

Source

fn begin_table(&mut self, table: &PlannedTable) -> Result<(), GenerateError>

Called once before any of table’s rows are written.

Source

fn write_row( &mut self, table: &PlannedTable, row: &GeneratedRow, ) -> Result<(), GenerateError>

Called once per generated row of table, in row order.

Source

fn end_table(&mut self, table: &PlannedTable) -> Result<(), GenerateError>

Called once after all of table’s rows are written.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§