Document serde::iter
This commit is contained in:
parent
902d3a0aa5
commit
c7f1af90b2
@ -1,8 +1,9 @@
|
|||||||
#![allow(missing_docs)]
|
//! Module that contains helper iterators.
|
||||||
|
|
||||||
use std::io;
|
use std::io;
|
||||||
use std::iter::Peekable;
|
use std::iter::Peekable;
|
||||||
|
|
||||||
|
/// Iterator over a byte stream that tracks the current position's line and column.
|
||||||
pub struct LineColIterator<Iter: Iterator<Item=io::Result<u8>>> {
|
pub struct LineColIterator<Iter: Iterator<Item=io::Result<u8>>> {
|
||||||
iter: Iter,
|
iter: Iter,
|
||||||
line: usize,
|
line: usize,
|
||||||
@ -10,6 +11,7 @@ pub struct LineColIterator<Iter: Iterator<Item=io::Result<u8>>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<Iter: Iterator<Item=io::Result<u8>>> LineColIterator<Iter> {
|
impl<Iter: Iterator<Item=io::Result<u8>>> LineColIterator<Iter> {
|
||||||
|
/// Construct a new `LineColIterator<Iter>`.
|
||||||
pub fn new(iter: Iter) -> LineColIterator<Iter> {
|
pub fn new(iter: Iter) -> LineColIterator<Iter> {
|
||||||
LineColIterator {
|
LineColIterator {
|
||||||
iter: iter,
|
iter: iter,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user