Struct TryUnfold
#[must_use = "streams do nothing unless polled"]
pub struct TryUnfold<T, F, Fut> { /* private fields */ }
Stream for the try_unfold function.
Trait Implementations
impl<'__pin, T, F, Fut> Unpin for TryUnfold<T, F, Fut>
where
PinnedFieldsOf<__Origin<'__pin, T, F, Fut>>: Unpin,
impl<T, F, Fut> Debug for TryUnfold<T, F, Fut>
where
T: Debug,
Fut: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<T, F, Fut, Item> Stream for TryUnfold<T, F, Fut>
where
F: FnMut(T) -> Fut,
Fut: TryFuture<Ok = Option<(Item, T)>>,
type Item = Result<Item, <Fut as TryFuture>::Error>;fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>
Auto Trait Implementations
impl<T, F, Fut> Freeze for TryUnfold<T, F, Fut>
where
F: Freeze,
Option<T>: Freeze,
Option<Fut>: Freeze,
impl<T, F, Fut> RefUnwindSafe for TryUnfold<T, F, Fut>
where
F: RefUnwindSafe,
Option<T>: RefUnwindSafe,
Option<Fut>: RefUnwindSafe,
impl<T, F, Fut> Send for TryUnfold<T, F, Fut>
where
F: Send,
Option<T>: Send,
Option<Fut>: Send,
impl<T, F, Fut> Sync for TryUnfold<T, F, Fut>
where
F: Sync,
Option<T>: Sync,
Option<Fut>: Sync,
impl<T, F, Fut> UnsafeUnpin for TryUnfold<T, F, Fut>
where
F: UnsafeUnpin,
Option<T>: UnsafeUnpin,
Option<Fut>: UnsafeUnpin,
impl<T, F, Fut> UnwindSafe for TryUnfold<T, F, Fut>
where
F: UnwindSafe,
Option<T>: UnwindSafe,
Option<Fut>: UnwindSafe,
Blanket Implementations
impl<S> TryStreamExt for TryUnfold<T, F, Fut>
where
S: TryStream + ?Sized,
impl<S, T, E> TryStream for TryUnfold<T, F, Fut>
where
S: Stream<Item = Result<T, E>> + ?Sized,
type Ok = T;type Error = E;fn try_poll_next(self: Pin<&mut S>, cx: &mut Context<'_>) -> Poll<Option<Result<<S as TryStream>::Ok, <S as TryStream>::Error>>>
impl<T> Any for TryUnfold<T, F, Fut>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for TryUnfold<T, F, Fut>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for TryUnfold<T, F, Fut>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for TryUnfold<T, F, Fut>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> StreamExt for TryUnfold<T, F, Fut>
where
T: Stream + ?Sized,
impl<T, U> Into<U> for TryUnfold<T, F, Fut>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for TryUnfold<T, F, Fut>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for TryUnfold<T, F, Fut>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>