pub trait RowObserver: Send + Sync {
// Provided methods
fn on_begin_row(&self, _row_index: usize) { ... }
fn on_put_field(
&self,
_row_index: usize,
_resolved_name: &str,
_slot: usize,
_value: &Value<'_>,
) { ... }
fn on_row_accepted(&self, _row_index: usize) { ... }
fn on_row_rejected(&self, _row_index: usize) { ... }
fn on_chunk_finished(
&self,
_total: usize,
_accepted: usize,
_rejected: usize,
) { ... }
}Expand description
Hook points invoked by TableBuilder while building a batch.
All methods default to no-ops; implement only the ones you need.
Provided Methods§
Sourcefn on_begin_row(&self, _row_index: usize)
fn on_begin_row(&self, _row_index: usize)
A new row started. row_index is the number of rows accepted so far.
Sourcefn on_put_field(
&self,
_row_index: usize,
_resolved_name: &str,
_slot: usize,
_value: &Value<'_>,
)
fn on_put_field( &self, _row_index: usize, _resolved_name: &str, _slot: usize, _value: &Value<'_>, )
A field value landed in a column of an accepted (or not-yet-rejected)
row. slot is the column index in first-appearance order.
Sourcefn on_row_accepted(&self, _row_index: usize)
fn on_row_accepted(&self, _row_index: usize)
The row passed the filter (or no filter) and was committed.
Sourcefn on_row_rejected(&self, _row_index: usize)
fn on_row_rejected(&self, _row_index: usize)
The row was rejected by the filter and discarded.
Sourcefn on_chunk_finished(&self, _total: usize, _accepted: usize, _rejected: usize)
fn on_chunk_finished(&self, _total: usize, _accepted: usize, _rejected: usize)
A batch/chunk finished. Counts cover the rows since the previous finished batch (in streaming mode each emitted batch reports its own delta).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".