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§
Sourcefn begin_table(&mut self, table: &PlannedTable) -> Result<(), GenerateError>
fn begin_table(&mut self, table: &PlannedTable) -> Result<(), GenerateError>
Called once before any of table’s rows are written.
Sourcefn write_row(
&mut self,
table: &PlannedTable,
row: &GeneratedRow,
) -> Result<(), GenerateError>
fn write_row( &mut self, table: &PlannedTable, row: &GeneratedRow, ) -> Result<(), GenerateError>
Called once per generated row of table, in row order.
Sourcefn end_table(&mut self, table: &PlannedTable) -> Result<(), GenerateError>
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".