mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-23 09:09:19 +08:00
Merge pull request #757 from gwenn/iterators_doc
Try to explain why we need a map function
This commit is contained in:
commit
f04b4b62b9
@ -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> {
|
pub struct Map<'stmt, F> {
|
||||||
rows: Rows<'stmt>,
|
rows: Rows<'stmt>,
|
||||||
f: F,
|
f: F,
|
||||||
@ -116,6 +117,8 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// An iterator over the mapped resulting rows of a query.
|
/// 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> {
|
pub struct MappedRows<'stmt, F> {
|
||||||
rows: Rows<'stmt>,
|
rows: Rows<'stmt>,
|
||||||
map: F,
|
map: F,
|
||||||
|
@ -219,6 +219,8 @@ impl Statement<'_> {
|
|||||||
/// Ok(names)
|
/// Ok(names)
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
/// `f` is used to tranform the _streaming_ iterator into a _standard_
|
||||||
|
/// iterator.
|
||||||
///
|
///
|
||||||
/// ## Failure
|
/// ## Failure
|
||||||
///
|
///
|
||||||
@ -256,6 +258,8 @@ impl Statement<'_> {
|
|||||||
/// Ok(names)
|
/// Ok(names)
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
/// `f` is used to tranform the _streaming_ iterator into a _standard_
|
||||||
|
/// iterator.
|
||||||
///
|
///
|
||||||
/// ## Failure
|
/// ## Failure
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user