Skip to main content

RemoteAddr

Trait RemoteAddr 

Source
pub trait RemoteAddr {
    // Required method
    fn remote_addr(&self) -> Option<SocketAddr>;
}
Expand description

Defines a method to get the remote (peer) address of a connection.

This trait might be needed to be implemented by for example custom TLS implementations.

Required Methods§

Source

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

Returns the remote (peer) address of this connection.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl RemoteAddr for AddrStream

Implementors§