pub trait Socket: Debug {
type ReadHalf: ReadHalf;
type WriteHalf: WriteHalf;
const CAN_TRANSFER_FDS: bool = false;
// 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.
Provided Associated Constants§
Sourceconst CAN_TRANSFER_FDS: bool = false
const CAN_TRANSFER_FDS: bool = false
Whether this socket can transfer file descriptors.
This is true for Unix domain sockets and false for other socket types.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.