Trait Socket

Source
pub trait Socket: Sized {
    type Server: ConnectionHandler<Self>;

    // Required methods
    fn get_stream(&mut self) -> &mut TcpStream;
    fn get_token(&self) -> &Token;
    fn get_addr(&self) -> &SocketAddr;
}

Required Associated Types§

Required Methods§

Source

fn get_stream(&mut self) -> &mut TcpStream

Source

fn get_token(&self) -> &Token

Source

fn get_addr(&self) -> &SocketAddr

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.

Implementors§