Skip to main content

StreamExecutor

Trait StreamExecutor 

Source
pub trait StreamExecutor: Executor {
    // Required method
    fn fetch_stream(
        &self,
        stmt: Statement,
    ) -> ExecFuture<'_, Result<RowStream, ExecError>>;
}
Expand description

Opt-in streaming. A backend that can stream implements it; nothing requires it, because drivers differ too much here for it to belong in the minimum contract (native streams borrow their connection; ours must not).

Required Methods§

Source

fn fetch_stream( &self, stmt: Statement, ) -> ExecFuture<'_, Result<RowStream, ExecError>>

Run a statement and hand rows back incrementally.

The returned RowStream is owned — dropping it cancels the producer and releases whatever connection it was riding.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§