pub struct Repeat<T>where
T: Clone,{ /* private fields */ }
Expand description
An iterable which yields the same value infinitely many times.
Trait Implementations§
Source§impl<T> Iterable for Repeat<T>where
T: Clone,
impl<T> Iterable for Repeat<T>where
T: Clone,
Source§fn iter(&self) -> Self::Iter
fn iter(&self) -> Self::Iter
Creates a new iterator from this iterable yielding elements of type
Iterable::Item
.Source§fn chained<I>(self, other: I) -> Chained<Self, I>
fn chained<I>(self, other: I) -> Chained<Self, I>
Takes two iterables and creates a new iterable over both in sequence. Read more
Source§fn cloned<'a, T>(self) -> Cloned<'a, T, Self>
fn cloned<'a, T>(self) -> Cloned<'a, T, Self>
Creates an iterable, iterators of which clone all of its elements. Read more
Source§fn copied<'a, T>(self) -> Copied<'a, T, Self>
fn copied<'a, T>(self) -> Copied<'a, T, Self>
Creates an iterable, iterators of which copy all of its elements. Read more
Source§fn enumerated(self) -> Enumerated<Self>where
Self: Sized,
fn enumerated(self) -> Enumerated<Self>where
Self: Sized,
Creates an iterable which gives the current iteration count as well as the next value. Read more
Source§fn filter_mapped<M, U>(self, filter_map: M) -> FilterMapped<Self, M, U>
fn filter_mapped<M, U>(self, filter_map: M) -> FilterMapped<Self, M, U>
Creates an iterable that both filters and maps. Read more
Source§fn filtered<P>(self, filter: P) -> Filtered<Self, P>
fn filtered<P>(self, filter: P) -> Filtered<Self, P>
Creates an iterable which uses a closure to determine if an element should be yielded. Read more
Source§fn flat_mapped<M, U>(self, flat_map: M) -> FlatMapped<Self, M, U>
fn flat_mapped<M, U>(self, flat_map: M) -> FlatMapped<Self, M, U>
Creates an iterable that works like map, but flattens nested structure. Read more
Source§fn flattened(self) -> Flattened<Self>
fn flattened(self) -> Flattened<Self>
Creates an iterable that flattens nested structure. Read more
Source§fn fused(self) -> Fused<Self>where
Self: Sized,
fn fused(self) -> Fused<Self>where
Self: Sized,
Creates an iterable which ends after the first
None
. Read moreSource§fn mapped_while<M, U>(self, map_while: M) -> MappedWhile<Self, M, U>
fn mapped_while<M, U>(self, map_while: M) -> MappedWhile<Self, M, U>
Creates an iterable that both yields elements based on a predicate and maps. Read more
Source§fn mapped<M, U>(self, map: M) -> Mapped<Self, M, U>
fn mapped<M, U>(self, map: M) -> Mapped<Self, M, U>
Takes a closure and creates an iterable which calls that closure on each element. Read more
Source§fn reversed(self) -> Reversed<Self>
fn reversed(self) -> Reversed<Self>
Creates an iterable iterators of which reverses the traversal direction. Read more
Source§fn skipped(self, n: usize) -> Skipped<Self>where
Self: Sized,
fn skipped(self, n: usize) -> Skipped<Self>where
Self: Sized,
Creates an iterable, iterators of which skip the first
n
elements. Read moreSource§fn skipped_while<P>(self, skip_while: P) -> SkippedWhile<Self, P>
fn skipped_while<P>(self, skip_while: P) -> SkippedWhile<Self, P>
Creates an iterable, iterators of which skip elements based on a predicate. Read more
Source§fn stepped_by(self, step: usize) -> SteppedBy<Self>where
Self: Sized,
fn stepped_by(self, step: usize) -> SteppedBy<Self>where
Self: Sized,
Creates an iterable starting at the same point, but stepping by the given amount at each iteration. Read more
Source§fn taken(self, n: usize) -> Taken<Self>where
Self: Sized,
fn taken(self, n: usize) -> Taken<Self>where
Self: Sized,
Creates an iterable whose iterators yield the first
n
elements, or fewer if the underlying iterator ends sooner. Read moreSource§fn taken_while<P>(self, take_while: P) -> TakenWhile<Self, P>
fn taken_while<P>(self, take_while: P) -> TakenWhile<Self, P>
Creates an iterable, iterators of which yield elements based on a predicate. Read more
Source§impl<T> IterableObj for Repeat<T>where
T: Clone,
impl<T> IterableObj for Repeat<T>where
T: Clone,
Source§type Item = T
type Item = T
Type of the item that the iterators created by the
boxed_iter
method yields.Auto Trait Implementations§
impl<T> Freeze for Repeat<T>where
T: Freeze,
impl<T> RefUnwindSafe for Repeat<T>where
T: RefUnwindSafe,
impl<T> Send for Repeat<T>where
T: Send,
impl<T> Sync for Repeat<T>where
T: Sync,
impl<T> Unpin for Repeat<T>where
T: Unpin,
impl<T> UnwindSafe for Repeat<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more