sea_orm

Trait StreamTrait

Source
pub trait StreamTrait: Send + Sync {
    type Stream<'a>: Stream<Item = Result<QueryResult, DbErr>> + Send
       where Self: 'a;

    // Required method
    fn stream<'a>(
        &'a self,
        stmt: Statement,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Stream<'a>, DbErr>> + Send + 'a>>;
}
Expand description

Stream query results

Required Associated Types§

Source

type Stream<'a>: Stream<Item = Result<QueryResult, DbErr>> + Send where Self: 'a

Create a stream for the QueryResult

Required Methods§

Source

fn stream<'a>( &'a self, stmt: Statement, ) -> Pin<Box<dyn Future<Output = Result<Self::Stream<'a>, DbErr>> + Send + 'a>>

Execute a Statement and return a stream of results

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§