Struct futures_util::stream::RepeatWith
source · [−]pub struct RepeatWith<F> { /* private fields */ }
Expand description
An stream that repeats elements of type A
endlessly by
applying the provided closure F: FnMut() -> A
.
This struct
is created by the repeat_with()
function.
See its documentation for more.
Trait Implementations
sourceimpl<F: Clone> Clone for RepeatWith<F>
impl<F: Clone> Clone for RepeatWith<F>
sourcefn clone(&self) -> RepeatWith<F>
fn clone(&self) -> RepeatWith<F>
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<F: Debug> Debug for RepeatWith<F>
impl<F: Debug> Debug for RepeatWith<F>
sourceimpl<A, F: FnMut() -> A> FusedStream for RepeatWith<F>
impl<A, F: FnMut() -> A> FusedStream for RepeatWith<F>
sourcefn is_terminated(&self) -> bool
fn is_terminated(&self) -> bool
Returns
true
if the stream should no longer be polled.sourceimpl<A, F: FnMut() -> A> Stream for RepeatWith<F>
impl<A, F: FnMut() -> A> Stream for RepeatWith<F>
type Item = A
type Item = A
Values yielded by the stream.
impl<A, F: FnMut() -> A> Unpin for RepeatWith<F>
Auto Trait Implementations
impl<F> RefUnwindSafe for RepeatWith<F>where
F: RefUnwindSafe,
impl<F> Send for RepeatWith<F>where
F: Send,
impl<F> Sync for RepeatWith<F>where
F: Sync,
impl<F> UnwindSafe for RepeatWith<F>where
F: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more