Struct SplitSink

#[must_use = "sinks do nothing unless polled"]
pub struct SplitSink<S, Item> { /* private fields */ }

A Sink part of the split pair

Implementations

impl<S, Item> SplitSink<S, Item>

fn is_pair_of(&self, other: &SplitStream<S>) -> bool

Returns true if the SplitStream<S> and SplitSink<S> originate from the same call to StreamExt::split.

impl<S: Sink<Item> + Unpin, Item> SplitSink<S, Item>

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 StreamExt::split.

Trait Implementations

impl<S, Item> Unpin for SplitSink<S, Item>

impl<S: Debug, Item: Debug> Debug for SplitSink<S, Item>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<S: Sink<Item>, Item> Sink<Item> for SplitSink<S, Item>

type Error = <S as Sink<Item>>::Error;
fn poll_ready(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), S::Error>>
fn start_send(self: Pin<&mut Self>, item: Item) -> Result<(), S::Error>
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), S::Error>>
fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), S::Error>>

Auto Trait Implementations

impl<S, Item> !RefUnwindSafe for SplitSink<S, Item>

impl<S, Item> !UnwindSafe for SplitSink<S, Item>

impl<S, Item> Freeze for SplitSink<S, Item> where BiLock<S>: Freeze, Option<Item>: Freeze,

impl<S, Item> Send for SplitSink<S, Item> where BiLock<S>: Send, Option<Item>: Send,

impl<S, Item> Sync for SplitSink<S, Item> where BiLock<S>: Sync, Option<Item>: Sync,

impl<S, Item> UnsafeUnpin for SplitSink<S, Item> where BiLock<S>: UnsafeUnpin, Option<Item>: UnsafeUnpin,

Blanket Implementations

impl<T> Any for SplitSink<S, Item> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for SplitSink<S, Item> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for SplitSink<S, Item> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for SplitSink<S, Item>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, Item> SinkExt<Item> for SplitSink<S, Item> where T: Sink<Item> + ?Sized,

impl<T, U> Into<U> for SplitSink<S, Item> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for SplitSink<S, Item> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for SplitSink<S, Item> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>