Struct futures_util::stream::SplitSink
source · pub struct SplitSink<S: Sink<Item>, Item> { /* private fields */ }
Expand description
A Sink
part of the split pair
Implementations§
source§impl<S: Sink<Item> + Unpin, Item> SplitSink<S, Item>
impl<S: Sink<Item> + Unpin, Item> SplitSink<S, Item>
sourcepub fn reunite(self, other: SplitStream<S>) -> Result<S, ReuniteError<S, Item>>
pub fn reunite(self, other: SplitStream<S>) -> Result<S, ReuniteError<S, Item>>
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§
source§impl<S: Sink<Item>, Item> Sink<Item> for SplitSink<S, Item>
impl<S: Sink<Item>, Item> Sink<Item> for SplitSink<S, Item>
§type SinkError = <S as Sink<Item>>::SinkError
type SinkError = <S as Sink<Item>>::SinkError
The type of value produced by the sink when an error occurs.
source§fn poll_ready(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Result<(), S::SinkError>>
fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), S::SinkError>>
Attempts to prepare the
Sink
to receive a value. Read moresource§fn start_send(self: Pin<&mut Self>, item: Item) -> Result<(), S::SinkError>
fn start_send(self: Pin<&mut Self>, item: Item) -> Result<(), S::SinkError>
Begin the process of sending a value to the sink.
Each call to this function must be proceeded by a successful call to
poll_ready
which returned Poll::Ready(Ok(()))
. Read moreimpl<S: Sink<Item>, Item> Unpin for SplitSink<S, Item>
Auto Trait Implementations§
impl<S, Item> Freeze for SplitSink<S, Item>where
Item: Freeze,
impl<S, Item> !RefUnwindSafe for SplitSink<S, Item>
impl<S, Item> Send for SplitSink<S, Item>
impl<S, Item> Sync for SplitSink<S, Item>
impl<S, Item> !UnwindSafe for SplitSink<S, Item>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T, Item> SinkExt<Item> for T
impl<T, Item> SinkExt<Item> for T
source§fn with<U, Fut, F, E>(self, f: F) -> With<Self, Item, U, Fut, F>
fn with<U, Fut, F, E>(self, f: F) -> With<Self, Item, U, Fut, F>
Composes a function in front of the sink. Read more
source§fn with_flat_map<U, St, F>(self, f: F) -> WithFlatMap<Self, Item, U, St, F>
fn with_flat_map<U, St, F>(self, f: F) -> WithFlatMap<Self, Item, U, St, F>
Composes a function in front of the sink. Read more
source§fn sink_map_err<E, F>(self, f: F) -> SinkMapErr<Self, F>
fn sink_map_err<E, F>(self, f: F) -> SinkMapErr<Self, F>
Transforms the error returned by the sink.
source§fn sink_err_into<E>(self) -> SinkErrInto<Self, Item, E>
fn sink_err_into<E>(self) -> SinkErrInto<Self, Item, E>
Map this sink’s error to a different error type using the
Into
trait. Read moresource§fn buffer(self, capacity: usize) -> Buffer<Self, Item>where
Self: Sized,
fn buffer(self, capacity: usize) -> Buffer<Self, Item>where
Self: Sized,
Adds a fixed-size buffer to the current sink. Read more
source§fn flush(&mut self) -> Flush<'_, Self, Item> ⓘwhere
Self: Unpin,
fn flush(&mut self) -> Flush<'_, Self, Item> ⓘwhere
Self: Unpin,
Flush the sync, processing all pending items. Read more
source§fn send(&mut self, item: Item) -> Send<'_, Self, Item> ⓘwhere
Self: Unpin,
fn send(&mut self, item: Item) -> Send<'_, Self, Item> ⓘwhere
Self: Unpin,
A future that completes after the given item has been fully processed
into the sink, including flushing. Read more
source§fn send_all<'a, St>(&'a mut self, stream: &'a mut St) -> SendAll<'a, Self, St> ⓘ
fn send_all<'a, St>(&'a mut self, stream: &'a mut St) -> SendAll<'a, Self, St> ⓘ
A future that completes after the given stream has been fully processed
into the sink, including flushing. Read more