Trait thrift::transport::TIoChannel [] [src]

pub trait TIoChannel: Read + Write {
    fn split(self) -> Result<(ReadHalf<Self>, WriteHalf<Self>)>
    where
        Self: Sized
; }

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

Required Methods

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.

Implementors