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 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more