Trait ntex_net::connect::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§