Struct SplitStream

#[must_use = "streams do nothing unless polled"]
pub struct SplitStream<S>(/* private field */);

A Stream part of the split pair

Implementations

impl<S> SplitStream<S>

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

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

impl<S: Unpin> SplitStream<S>

fn reunite<Item>(self, other: SplitSink<S, Item>) -> Result<S, ReuniteError<S, Item>>
where
    S: Sink<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> Unpin for SplitStream<S>

impl<S: Debug> Debug for SplitStream<S>

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

impl<S: Stream> Stream for SplitStream<S>

type Item = <S as Stream>::Item;
fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<S::Item>>

Auto Trait Implementations

impl<S> !RefUnwindSafe for SplitStream<S>

impl<S> !UnwindSafe for SplitStream<S>

impl<S> Freeze for SplitStream<S> where BiLock<S>: Freeze,

impl<S> Send for SplitStream<S> where BiLock<S>: Send,

impl<S> Sync for SplitStream<S> where BiLock<S>: Sync,

impl<S> UnsafeUnpin for SplitStream<S> where BiLock<S>: UnsafeUnpin,

Blanket Implementations

impl<S> TryStreamExt for SplitStream<S> where S: TryStream + ?Sized,

impl<S, T, E> TryStream for SplitStream<S> 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 SplitStream<S> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

impl<T> From<T> for SplitStream<S>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> StreamExt for SplitStream<S> where T: Stream + ?Sized,

impl<T, U> Into<U> for SplitStream<S> 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 SplitStream<S> where U: Into<T>,

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

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

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