Trait Address

Source
pub trait Address: Unpin + 'static {
    // Required methods
    fn host(&self) -> &str;
    fn port(&self) -> Option<u16>;

    // Provided method
    fn addr(&self) -> Option<SocketAddr> { ... }
}
Expand description

Connect request

Required Methods§

Source

fn host(&self) -> &str

Host name of the request

Source

fn port(&self) -> Option<u16>

Port of the request

Provided Methods§

Source

fn addr(&self) -> Option<SocketAddr>

SocketAddr of the address

Implementations on Foreign Types§

Source§

impl Address for &'static str

Source§

fn host(&self) -> &str

Source§

fn port(&self) -> Option<u16>

Source§

impl Address for SocketAddr

Source§

fn host(&self) -> &str

Source§

fn port(&self) -> Option<u16>

Source§

fn addr(&self) -> Option<SocketAddr>

Source§

impl Address for String

Source§

fn host(&self) -> &str

Source§

fn port(&self) -> Option<u16>

Source§

impl Address for Uri

Source§

fn host(&self) -> &str

Source§

fn port(&self) -> Option<u16>

Source§

impl Address for ByteString

Source§

fn host(&self) -> &str

Source§

fn port(&self) -> Option<u16>

Implementors§