Struct SinkMapErr
#[must_use = "sinks do nothing unless polled"]
pub struct SinkMapErr<Si, F> { /* private fields */ }
Sink for the sink_map_err method.
Implementations
impl<Si, F> SinkMapErr<Si, F>
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, F> Unpin for SinkMapErr<Si, F>
where
PinnedFieldsOf<__Origin<'__pin, Si, F>>: Unpin,
impl<S: FusedStream, F> FusedStream for SinkMapErr<S, F>
fn is_terminated(&self) -> bool
impl<S: Stream, F> Stream for SinkMapErr<S, F>
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, F, E, Item> Sink<Item> for SinkMapErr<Si, F>
where
Si: Sink<Item>,
F: FnOnce(Si::Error) -> E,
type Error = E;fn poll_ready(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>fn start_send(self: Pin<&mut Self>, item: Item) -> 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>>
impl<Si: Clone, F: Clone> Clone for SinkMapErr<Si, F>
fn clone(&self) -> SinkMapErr<Si, F>
impl<Si: Debug, F: Debug> Debug for SinkMapErr<Si, F>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl<Si, F> Freeze for SinkMapErr<Si, F>
where
Si: Freeze,
Option<F>: Freeze,
impl<Si, F> RefUnwindSafe for SinkMapErr<Si, F>
where
Si: RefUnwindSafe,
Option<F>: RefUnwindSafe,
impl<Si, F> Send for SinkMapErr<Si, F>
where
Si: Send,
Option<F>: Send,
impl<Si, F> Sync for SinkMapErr<Si, F>
where
Si: Sync,
Option<F>: Sync,
impl<Si, F> UnsafeUnpin for SinkMapErr<Si, F>
where
Si: UnsafeUnpin,
Option<F>: UnsafeUnpin,
impl<Si, F> UnwindSafe for SinkMapErr<Si, F>
where
Si: UnwindSafe,
Option<F>: UnwindSafe,
Blanket Implementations
impl<S> TryStreamExt for SinkMapErr<Si, F>
where
S: TryStream + ?Sized,
impl<S, T, E> TryStream for SinkMapErr<Si, 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 SinkMapErr<Si, F>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for SinkMapErr<Si, F>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for SinkMapErr<Si, F>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for SinkMapErr<Si, F>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for SinkMapErr<Si, F>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> StreamExt for SinkMapErr<Si, F>
where
T: Stream + ?Sized,
impl<T> ToOwned for SinkMapErr<Si, F>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, Item> SinkExt<Item> for SinkMapErr<Si, F>
where
T: Sink<Item> + ?Sized,
impl<T, U> Into<U> for SinkMapErr<Si, 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 SinkMapErr<Si, F>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for SinkMapErr<Si, F>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>