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