Trait thrift::transport::TIoChannel

source ·
pub trait TIoChannel: Read + Write {
    // Required method
    fn split(self) -> Result<(ReadHalf<Self>, WriteHalf<Self>)>
       where Self: Sized;
}
Expand description

Identifies a splittable bidirectional I/O channel used to send and receive bytes.

Required Methods§

source

fn split(self) -> Result<(ReadHalf<Self>, WriteHalf<Self>)>
where Self: Sized,

Split the channel into a readable half and a writable half, where the readable half implements io::Read and the writable half implements io::Write. Returns None if the channel was not initialized, or if it cannot be split safely.

Returned halves may share the underlying OS channel or buffer resources. Implementations should ensure that these two halves can be safely used independently by concurrent threads.

Implementations on Foreign Types§

source§

impl TIoChannel for UnixStream

source§

fn split(self) -> Result<(ReadHalf<Self>, WriteHalf<Self>)>
where Self: Sized,

Implementors§