Struct Split
pub struct Split<T>(/* private fields */);Available on crate feature
io only.Expand description
Splitting an I/O type into separate read and write halves
Implementations§
Trait Implementations§
§impl<T> Splittable for Split<T>where
T: AsyncRead + AsyncWrite,
impl<T> Splittable for Split<T>where
T: AsyncRead + AsyncWrite,
§type ReadHalf = ReadHalf<T>
type ReadHalf = ReadHalf<T>
The type of the read half, which normally implements
AsyncRead or
AsyncReadAt.§type WriteHalf = WriteHalf<T>
type WriteHalf = WriteHalf<T>
The type of the write half, which normally implements
AsyncWrite or
AsyncWriteAt.§fn split(
self,
) -> (<Split<T> as Splittable>::ReadHalf, <Split<T> as Splittable>::WriteHalf)
fn split( self, ) -> (<Split<T> as Splittable>::ReadHalf, <Split<T> as Splittable>::WriteHalf)
Consumes
self and returns a tuple containing separate read and write
halves. Read moreAuto Trait Implementations§
impl<T> Freeze for Split<T>
impl<T> !RefUnwindSafe for Split<T>
impl<T> Send for Split<T>where
T: Send,
impl<T> Sync for Split<T>where
T: Send,
impl<T> Unpin for Split<T>
impl<T> !UnwindSafe for Split<T>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more