pub trait ClonableIterator { fn cycle(self) -> Cycle<Self>; }
A trait for iterators that are clonable.
fn cycle(self) -> Cycle<Self>
Repeats an iterator endlessly
let a = count(1,1).take(1);
let mut cy = a.cycle();
assert_eq!(cy.next(), Some(1));
assert_eq!(cy.next(), Some(1));
impl<A, T: Clone + Iterator<A>> ClonableIterator for T
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).