Struct WithFlatMap
#[must_use = "sinks do nothing unless polled"]
pub struct WithFlatMap<Si, Item, U, St, F> { /* private fields */ }
Sink for the with_flat_map method.
Implementations
impl<Si, Item, U, St, F> WithFlatMap<Si, Item, U, St, F>
where
Si: Sink<Item>,
F: FnMut(U) -> St,
St: Stream<Item = Result<Item, Si::Error>>,
fn get_ref(&self) -> &SiAcquires a reference to the underlying sink or stream that this combinator is pulling from.
fn get_mut(&mut self) -> &mut SiAcquires a mutable reference to the underlying sink or stream that this combinator is pulling from.
Note that care must be taken to avoid tampering with the state of the sink or stream which may otherwise confuse this combinator.
fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut Si>Acquires a pinned mutable reference to the underlying sink or stream that this combinator is pulling from.
Note that care must be taken to avoid tampering with the state of the sink or stream which may otherwise confuse this combinator.
fn into_inner(self) -> SiConsumes this combinator, returning the underlying sink or stream.
Note that this may discard intermediate state of this combinator, so care should be taken to avoid losing resources when this is called.
Trait Implementations
impl<'__pin, Si, Item, U, St, F> Unpin for WithFlatMap<Si, Item, U, St, F>
where
PinnedFieldsOf<__Origin<'__pin, Si, Item, U, St, F>>: Unpin,
impl<S, Item, U, St, F> FusedStream for WithFlatMap<S, Item, U, St, F>
where
S: FusedStream + Sink<Item>,
F: FnMut(U) -> St,
St: Stream<Item = Result<Item, S::Error>>,
fn is_terminated(&self) -> bool
impl<S, Item, U, St, F> Stream for WithFlatMap<S, Item, U, St, F>
where
S: Stream + Sink<Item>,
F: FnMut(U) -> St,
St: Stream<Item = Result<Item, S::Error>>,
type Item = <S as Stream>::Item;fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>fn size_hint(&self) -> (usize, Option<usize>)
impl<Si, Item, U, St, F> Debug for WithFlatMap<Si, Item, U, St, F>
where
Si: Debug,
St: Debug,
Item: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<Si, Item, U, St, F> Sink<U> for WithFlatMap<Si, Item, U, St, F>
where
Si: Sink<Item>,
F: FnMut(U) -> St,
St: Stream<Item = Result<Item, Si::Error>>,
type Error = <Si as Sink<Item>>::Error;fn poll_ready(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>fn start_send(self: Pin<&mut Self>, item: U) -> Result<(), Self::Error>fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Auto Trait Implementations
impl<Si, Item, U, St, F> Freeze for WithFlatMap<Si, Item, U, St, F>
where
Si: Freeze,
F: Freeze,
Option<St>: Freeze,
Option<Item>: Freeze,
PhantomData<fn(U)>: Freeze,
impl<Si, Item, U, St, F> RefUnwindSafe for WithFlatMap<Si, Item, U, St, F>
where
Si: RefUnwindSafe,
F: RefUnwindSafe,
Option<St>: RefUnwindSafe,
Option<Item>: RefUnwindSafe,
PhantomData<fn(U)>: RefUnwindSafe,
impl<Si, Item, U, St, F> Send for WithFlatMap<Si, Item, U, St, F>
where
Si: Send,
F: Send,
Option<St>: Send,
Option<Item>: Send,
PhantomData<fn(U)>: Send,
impl<Si, Item, U, St, F> Sync for WithFlatMap<Si, Item, U, St, F>
where
Si: Sync,
F: Sync,
Option<St>: Sync,
Option<Item>: Sync,
PhantomData<fn(U)>: Sync,
impl<Si, Item, U, St, F> UnsafeUnpin for WithFlatMap<Si, Item, U, St, F>
where
Si: UnsafeUnpin,
F: UnsafeUnpin,
Option<St>: UnsafeUnpin,
Option<Item>: UnsafeUnpin,
PhantomData<fn(U)>: UnsafeUnpin,
impl<Si, Item, U, St, F> UnwindSafe for WithFlatMap<Si, Item, U, St, F>
where
Si: UnwindSafe,
F: UnwindSafe,
Option<St>: UnwindSafe,
Option<Item>: UnwindSafe,
PhantomData<fn(U)>: UnwindSafe,
Blanket Implementations
impl<S> TryStreamExt for WithFlatMap<Si, Item, U, St, F>
where
S: TryStream + ?Sized,
impl<S, T, E> TryStream for WithFlatMap<Si, Item, U, St, F>
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 WithFlatMap<Si, Item, U, St, F>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for WithFlatMap<Si, Item, U, St, F>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for WithFlatMap<Si, Item, U, St, F>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for WithFlatMap<Si, Item, U, St, F>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> StreamExt for WithFlatMap<Si, Item, U, St, F>
where
T: Stream + ?Sized,
impl<T, Item> SinkExt<Item> for WithFlatMap<Si, Item, U, St, F>
where
T: Sink<Item> + ?Sized,
impl<T, U> Into<U> for WithFlatMap<Si, Item, U, St, F>
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 WithFlatMap<Si, Item, U, St, F>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for WithFlatMap<Si, Item, U, St, F>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>