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§
Sourcetype Stream<'a>: Stream<Item = Result<QueryResult, DbErr>> + Send
where
Self: 'a
type Stream<'a>: Stream<Item = Result<QueryResult, DbErr>> + Send where Self: 'a
Create a stream for the QueryResult
Required Methods§
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.