pub struct SplitSink<S>(_);
Expand description
A Sink
part of the split pair
Implementations
sourceimpl<S> SplitSink<S>
impl<S> SplitSink<S>
sourcepub fn reunite(self, other: SplitStream<S>) -> Result<S, ReuniteError<S>>
pub fn reunite(self, other: SplitStream<S>) -> Result<S, ReuniteError<S>>
Attempts to put the two “halves” of a split Stream + Sink
back
together. Succeeds only if the SplitStream<S>
and SplitSink<S>
are
a matching pair originating from the same call to Stream::split
.
Trait Implementations
sourceimpl<S: Sink> Sink for SplitSink<S>
impl<S: Sink> Sink for SplitSink<S>
sourcefn start_send(
&mut self,
item: S::SinkItem
) -> StartSend<S::SinkItem, S::SinkError>
fn start_send(
&mut self,
item: S::SinkItem
) -> StartSend<S::SinkItem, S::SinkError>
Begin the process of sending a value to the sink. Read more
sourcefn poll_complete(&mut self) -> Poll<(), S::SinkError>
fn poll_complete(&mut self) -> Poll<(), S::SinkError>
Flush all output from this sink, if necessary. Read more
sourcefn close(&mut self) -> Poll<(), S::SinkError>
fn close(&mut self) -> Poll<(), S::SinkError>
A method to indicate that no more values will ever be pushed into this sink. Read more
sourcefn wait(self) -> Wait<Self> where
Self: Sized,
fn wait(self) -> Wait<Self> where
Self: Sized,
Creates a new object which will produce a synchronous sink. Read more
sourcefn with<U, F, Fut>(self, f: F) -> With<Self, U, F, Fut> where
F: FnMut(U) -> Fut,
Fut: IntoFuture<Item = Self::SinkItem>,
Fut::Error: From<Self::SinkError>,
Self: Sized,
fn with<U, F, Fut>(self, f: F) -> With<Self, U, F, Fut> where
F: FnMut(U) -> Fut,
Fut: IntoFuture<Item = Self::SinkItem>,
Fut::Error: From<Self::SinkError>,
Self: Sized,
Composes a function in front of the sink. Read more
sourcefn with_flat_map<U, F, St>(self, f: F) -> WithFlatMap<Self, U, F, St> where
F: FnMut(U) -> St,
St: Stream<Item = Self::SinkItem, Error = Self::SinkError>,
Self: Sized,
fn with_flat_map<U, F, St>(self, f: F) -> WithFlatMap<Self, U, F, St> where
F: FnMut(U) -> St,
St: Stream<Item = Self::SinkItem, Error = Self::SinkError>,
Self: Sized,
Composes a function in front of the sink. Read more
sourcefn sink_map_err<F, E>(self, f: F) -> SinkMapErr<Self, F> where
F: FnOnce(Self::SinkError) -> E,
Self: Sized,
fn sink_map_err<F, E>(self, f: F) -> SinkMapErr<Self, F> where
F: FnOnce(Self::SinkError) -> E,
Self: Sized,
Transforms the error returned by the sink.
sourcefn sink_from_err<E: From<Self::SinkError>>(self) -> SinkFromErr<Self, E> where
Self: Sized,
fn sink_from_err<E: From<Self::SinkError>>(self) -> SinkFromErr<Self, E> where
Self: Sized,
Map this sink’s error to any error implementing From
for this sink’s
Error
, returning a new sink. Read more
sourcefn buffer(self, amt: usize) -> Buffer<Self> where
Self: Sized,
fn buffer(self, amt: usize) -> Buffer<Self> where
Self: Sized,
Adds a fixed-size buffer to the current sink. Read more
sourcefn fanout<S>(self, other: S) -> Fanout<Self, S> where
Self: Sized,
Self::SinkItem: Clone,
S: Sink<SinkItem = Self::SinkItem, SinkError = Self::SinkError>,
fn fanout<S>(self, other: S) -> Fanout<Self, S> where
Self: Sized,
Self::SinkItem: Clone,
S: Sink<SinkItem = Self::SinkItem, SinkError = Self::SinkError>,
Fanout items to multiple sinks. Read more
sourcefn flush(self) -> Flush<Self> where
Self: Sized,
fn flush(self) -> Flush<Self> where
Self: Sized,
A future that completes when the sink has finished processing all pending requests. Read more
Auto Trait Implementations
impl<S> !RefUnwindSafe for SplitSink<S>
impl<S> Send for SplitSink<S> where
S: Send,
impl<S> Sync for SplitSink<S> where
S: Send,
impl<S> Unpin for SplitSink<S>
impl<S> !UnwindSafe for SplitSink<S>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more