Skip to main content

Split

Trait Split 

Source
pub trait Split {
    type R;
    type W;

    // Required method
    fn split(self) -> (Self::R, Self::W);
}
Expand description

split something into two parts

Required Associated Types§

Source

type R

read half type

Source

type W

write half type

Required Methods§

Source

fn split(self) -> (Self::R, Self::W)

consume and return parts

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Split for TcpStream

Source§

type R = TcpStream

Source§

type W = TcpStream

Source§

fn split(self) -> (Self::R, Self::W)

Source§

impl<S: Read + Write> Split for TlsStream<S>

Available on crate feature sync_tls_rustls only.
Source§

type R = ReadHalf<StreamOwned<ClientConnection, S>>

Source§

type W = WriteHalf<StreamOwned<ClientConnection, S>>

Source§

fn split(self) -> (Self::R, Self::W)

Implementors§

Source§

impl Split for SyncStream

Source§

impl<S, R, W> Split for BufStream<S>
where R: Read, W: Write, S: Read + Write + Split<R = R, W = W> + Debug,