Skip to main content

Module stream

Module stream 

Source
Expand description

Extension traits for working with RowStreams.

Using these extension traits, RowStreams can be turned into Streams producing Extractable types.

§Examples

#[derive(Columns, Extract)]
struct User {
    id: i32,
    name: String,
}

async fn extract_users(i: RowStream) -> Result<Vec<User>, Error> {
    i.extract().try_collect().await
}

Structs§

ExtractStream
A Stream producing Ts from a RowStream.
ExtractStreamMut
A Stream producing Ts from a Pin<&mut RowStream>.

Traits§

RowStreamExtractExt
Extension trait for extracting from a RowStream.