Trait Socket

Source
pub trait Socket: Debug {
    type ReadHalf: ReadHalf;
    type WriteHalf: WriteHalf;

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

The socket trait.

This is the trait that needs to be implemented for a type to be used as a socket/transport.

Required Associated Types§

Source

type ReadHalf: ReadHalf

The read half of the socket.

Source

type WriteHalf: WriteHalf

The write half of the socket.

Required Methods§

Source

fn split(self) -> (Self::ReadHalf, Self::WriteHalf)

Split the socket into read and write halves.

Implementors§