Module tokio_postgres_extractor::iter
source · Expand description
Extension traits for working with iterators over Row
s.
Using these extension traits, iterators over Row
s can be turned into iterators
over Extract
able types.
Examples
#[derive(Columns, Extract)]
struct User<'a> {
id: i32,
name: &'a str,
}
fn extract_users<'a>(i: impl Iterator<Item = &'a Row>) -> Vec<User<'a>> {
i.extract_ref().collect()
}