Struct futures_util::stream::Unfold
source · [−]pub struct Unfold<T, F, Fut> { /* private fields */ }
Expand description
Stream for the unfold
function.
Trait Implementations
sourceimpl<T, F, Fut, Item> FusedStream for Unfold<T, F, Fut>where
F: FnMut(T) -> Fut,
Fut: Future<Output = Option<(Item, T)>>,
impl<T, F, Fut, Item> FusedStream for Unfold<T, F, Fut>where
F: FnMut(T) -> Fut,
Fut: Future<Output = Option<(Item, T)>>,
sourcefn is_terminated(&self) -> bool
fn is_terminated(&self) -> bool
Returns
true
if the stream should no longer be polled.sourceimpl<T, F, Fut, Item> Stream for Unfold<T, F, Fut>where
F: FnMut(T) -> Fut,
Fut: Future<Output = Option<(Item, T)>>,
impl<T, F, Fut, Item> Stream for Unfold<T, F, Fut>where
F: FnMut(T) -> Fut,
Fut: Future<Output = Option<(Item, T)>>,
type Item = Item
type Item = Item
Values yielded by the stream.
impl<'__pin, T, F, Fut> Unpin for Unfold<T, F, Fut>where
__Origin<'__pin, T, F, Fut>: Unpin,
Auto Trait Implementations
impl<T, F, Fut> RefUnwindSafe for Unfold<T, F, Fut>where
F: RefUnwindSafe,
Fut: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, F, Fut> Send for Unfold<T, F, Fut>where
F: Send,
Fut: Send,
T: Send,
impl<T, F, Fut> Sync for Unfold<T, F, Fut>where
F: Sync,
Fut: Sync,
T: Sync,
impl<T, F, Fut> UnwindSafe for Unfold<T, F, Fut>where
F: UnwindSafe,
Fut: UnwindSafe,
T: 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