pub trait SqlRowConsumer: Send + 'static {
// Required methods
fn push_row(&mut self, row: SqlRow) -> StorageResult<()>;
fn into_any(self: Box<Self>) -> Box<dyn Any + Send>;
}Expand description
Owned state for consuming one SQL result in statement order.
A consumer must do bounded synchronous work and must not reenter SQL or wait for another operation on the same connection. Only private output should be accumulated: a failed query does not return the consumer, but cannot undo external side effects performed by it. Cancellation cannot preempt a blocked consumer; an interrupt hard-cap timeout may leave the worker owning it until that worker exits.
Required Methods§
Sourcefn push_row(&mut self, row: SqlRow) -> StorageResult<()>
fn push_row(&mut self, row: SqlRow) -> StorageResult<()>
Consume one owned row, which may be dropped before the next row is read.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".