/// An double-ended iterator with the direction inverted
// FIXME #6967: Dummy A parameter to get around type inference bug
+#[deriving(Clone)]
pub struct InvertIterator<A, T> {
priv iter: T
}
}
/// An iterator that repeats endlessly
+#[deriving(Clone)]
pub struct CycleIterator<A, T> {
priv orig: T,
priv iter: T,
/// An iterator which strings two iterators together
// FIXME #6967: Dummy A parameter to get around type inference bug
+#[deriving(Clone)]
pub struct ChainIterator<A, T, U> {
priv a: T,
priv b: U,
/// An iterator which iterates two other iterators simultaneously
// FIXME #6967: Dummy A & B parameters to get around type inference bug
+#[deriving(Clone)]
pub struct ZipIterator<A, T, B, U> {
priv a: T,
priv b: U
/// An iterator which yields the current count and the element during iteration
// FIXME #6967: Dummy A parameter to get around type inference bug
+#[deriving(Clone)]
pub struct EnumerateIterator<A, T> {
priv iter: T,
priv count: uint
/// An iterator which skips over `n` elements of `iter`.
// FIXME #6967: Dummy A parameter to get around type inference bug
+#[deriving(Clone)]
pub struct SkipIterator<A, T> {
priv iter: T,
priv n: uint
/// An iterator which only iterates over the first `n` iterations of `iter`.
// FIXME #6967: Dummy A parameter to get around type inference bug
+#[deriving(Clone)]
pub struct TakeIterator<A, T> {
priv iter: T,
priv n: uint
/// An infinite iterator starting at `start` and advancing by `step` with each
/// iteration
+#[deriving(Clone)]
pub struct Counter<A> {
/// The current state the counter is at (next value to be yielded)
state: A,