~dkellner/chronofold

16773193b2d21f814d322bec602d3c2e0bebb64b — Dominik Kellner a month ago 24c9017 main
Add documentation for public iterator structs
1 files changed, 8 insertions(+), 0 deletions(-)

M src/iter.rs
M src/iter.rs => src/iter.rs +8 -0
@@ 122,6 122,10 @@ impl<'a, A: Author, T> Iterator for CausalIter<'a, A, T> {
    }
}

/// An iterator over the elements of a chronofold.
///
/// This struct is created by the `iter` and `iter_range` methods on
/// `Chronofold`. See its documentation for more.
pub struct Iter<'a, A, T> {
    causal_iter: CausalIter<'a, A, T>,
    current: Option<(&'a Change<T>, LogIndex)>,


@@ 154,6 158,10 @@ impl<'a, A: Author, T> Iterator for Iter<'a, A, T> {
    }
}

/// An iterator over ops representing a chronofold's changes.
///
/// This struct is created by the `iter_ops` method on `Chronofold`. See its
/// documentation for more.
pub struct Ops<'a, A, T> {
    cfold: &'a Chronofold<A, T>,
    idx_iter: Range<usize>,