Same as `refill` but prints the lines of each paragraph to a pager instead of returning them and prefixes them with an optional `indent`. The width is automatically determined from the console's size.
(
pager: &mut Pager<'_>,
paragraphs: P,
indent: &str,
)
| 125 | /// |
| 126 | /// The width is automatically determined from the console's size. |
| 127 | pub(crate) async fn refill_and_page<S: AsRef<str>, P: IntoIterator<Item = S>>( |
| 128 | pager: &mut Pager<'_>, |
| 129 | paragraphs: P, |
| 130 | indent: &str, |
| 131 | ) -> io::Result<()> { |
| 132 | for line in refill_many(paragraphs, indent, usize::from(pager.columns())) { |
| 133 | pager.print(&line).await?; |
| 134 | } |
| 135 | Ok(()) |
| 136 | } |
| 137 | |
| 138 | #[cfg(test)] |
| 139 | mod tests { |
no test coverage detected