[−][src]Struct futures::sink::With
Sink for the Sink::with
combinator, chaining a computation to run prior
to pushing a value into the underlying sink.
Methods
impl<S, U, F, Fut> With<S, U, F, Fut> where
S: Sink,
F: FnMut(U) -> Fut,
Fut: IntoFuture<Item = S::SinkItem>,
Fut::Error: From<S::SinkError>,
[src][−]
S: Sink,
F: FnMut(U) -> Fut,
Fut: IntoFuture<Item = S::SinkItem>,
Fut::Error: From<S::SinkError>,
pub fn get_ref(&self) -> &S
[src][−]
Get a shared reference to the inner sink.
pub fn get_mut(&mut self) -> &mut S
[src][−]
Get a mutable reference to the inner sink.
pub fn into_inner(self) -> S
[src][−]
Consumes this combinator, returning the underlying sink.
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<S: Clone, U: Clone, F: Clone, Fut: Clone> Clone for With<S, U, F, Fut> where
S: Sink,
F: FnMut(U) -> Fut,
Fut: IntoFuture,
Fut::Future: Clone,
S::SinkItem: Clone,
[src][+]
S: Sink,
F: FnMut(U) -> Fut,
Fut: IntoFuture,
Fut::Future: Clone,
S::SinkItem: Clone,
impl<S: Debug, U: Debug, F: Debug, Fut: Debug> Debug for With<S, U, F, Fut> where
S: Sink,
F: FnMut(U) -> Fut,
Fut: IntoFuture,
Fut::Future: Debug,
S::SinkItem: Debug,
[src][+]
S: Sink,
F: FnMut(U) -> Fut,
Fut: IntoFuture,
Fut::Future: Debug,
S::SinkItem: Debug,
impl<S, U, F, Fut> Sink for With<S, U, F, Fut> where
S: Sink,
F: FnMut(U) -> Fut,
Fut: IntoFuture<Item = S::SinkItem>,
Fut::Error: From<S::SinkError>,
[src][+]
S: Sink,
F: FnMut(U) -> Fut,
Fut: IntoFuture<Item = S::SinkItem>,
Fut::Error: From<S::SinkError>,
impl<S, U, F, Fut> Stream for With<S, U, F, Fut> where
S: Stream + Sink,
F: FnMut(U) -> Fut,
Fut: IntoFuture,
[src][+]
S: Stream + Sink,
F: FnMut(U) -> Fut,
Fut: IntoFuture,
Auto Trait Implementations
impl<S, U, F, Fut> RefUnwindSafe for With<S, U, F, Fut> where
F: RefUnwindSafe,
S: RefUnwindSafe,
<Fut as IntoFuture>::Future: RefUnwindSafe,
<S as Sink>::SinkItem: RefUnwindSafe,
F: RefUnwindSafe,
S: RefUnwindSafe,
<Fut as IntoFuture>::Future: RefUnwindSafe,
<S as Sink>::SinkItem: RefUnwindSafe,
impl<S, U, F, Fut> Send for With<S, U, F, Fut> where
F: Send,
S: Send,
<Fut as IntoFuture>::Future: Send,
<S as Sink>::SinkItem: Send,
F: Send,
S: Send,
<Fut as IntoFuture>::Future: Send,
<S as Sink>::SinkItem: Send,
impl<S, U, F, Fut> Sync for With<S, U, F, Fut> where
F: Sync,
S: Sync,
<Fut as IntoFuture>::Future: Sync,
<S as Sink>::SinkItem: Sync,
F: Sync,
S: Sync,
<Fut as IntoFuture>::Future: Sync,
<S as Sink>::SinkItem: Sync,
impl<S, U, F, Fut> Unpin for With<S, U, F, Fut> where
F: Unpin,
S: Unpin,
<Fut as IntoFuture>::Future: Unpin,
<S as Sink>::SinkItem: Unpin,
F: Unpin,
S: Unpin,
<Fut as IntoFuture>::Future: Unpin,
<S as Sink>::SinkItem: Unpin,
impl<S, U, F, Fut> UnwindSafe for With<S, U, F, Fut> where
F: UnwindSafe,
S: UnwindSafe,
<Fut as IntoFuture>::Future: UnwindSafe,
<S as Sink>::SinkItem: UnwindSafe,
F: UnwindSafe,
S: UnwindSafe,
<Fut as IntoFuture>::Future: UnwindSafe,
<S as Sink>::SinkItem: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,