Struct Unfold
Deprecated since 0.13.0: Use [std::iter::FromFn](https://doc.rust-lang.org/std/iter/struct.FromFn.html) instead
#[must_use = "iterators are lazy and do nothing unless consumed"]
pub struct Unfold<St, F> { pub state: St, /* private fields */ }
See unfold for more information.
Fields
state: StInternal state that will be passed to the closure on the next iteration
Trait Implementations
impl<A, St, F> Iterator for Unfold<St, F>
where
F: FnMut(&mut St) -> Option<A>,
type Item = A;fn next(&mut self) -> Option<Self::Item>
impl<St, F> Debug for Unfold<St, F>
where
St: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<St: Clone, F: Clone> Clone for Unfold<St, F>
fn clone(&self) -> Self