Try to explain why we need a map function

To tranform the fallible streaming iterator.
This commit is contained in:
gwenn 2020-06-02 19:05:09 +02:00
parent bb34f3fec8
commit 7b08dc9ad5
2 changed files with 7 additions and 0 deletions

View File

@ -95,6 +95,7 @@ impl Drop for Rows<'_> {
}
}
/// `F` is used to tranform the _streaming_ iterator into a _fallible_ iterator.
pub struct Map<'stmt, F> {
rows: Rows<'stmt>,
f: F,
@ -116,6 +117,8 @@ where
}
/// An iterator over the mapped resulting rows of a query.
///
/// `F` is used to tranform the _streaming_ iterator into a _standard_ iterator.
pub struct MappedRows<'stmt, F> {
rows: Rows<'stmt>,
map: F,

View File

@ -219,6 +219,8 @@ impl Statement<'_> {
/// Ok(names)
/// }
/// ```
/// `f` is used to tranform the _streaming_ iterator into a _standard_
/// iterator.
///
/// ## Failure
///
@ -256,6 +258,8 @@ impl Statement<'_> {
/// Ok(names)
/// }
/// ```
/// `f` is used to tranform the _streaming_ iterator into a _standard_
/// iterator.
///
/// ## Failure
///