From 7b08dc9ad5dfc311620549dd052d24bd1c0efb35 Mon Sep 17 00:00:00 2001 From: gwenn Date: Tue, 2 Jun 2020 19:05:09 +0200 Subject: [PATCH] Try to explain why we need a map function To tranform the fallible streaming iterator. --- src/row.rs | 3 +++ src/statement.rs | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/row.rs b/src/row.rs index d880efd..3e536d9 100644 --- a/src/row.rs +++ b/src/row.rs @@ -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, diff --git a/src/statement.rs b/src/statement.rs index ed5dc96..92a4bf6 100644 --- a/src/statement.rs +++ b/src/statement.rs @@ -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 ///