Struct mas_listener::ConnectionInfo
source · pub struct ConnectionInfo { /* private fields */ }
Implementations§
source§impl ConnectionInfo
impl ConnectionInfo
sourcepub fn get_tls_ref(&self) -> Option<&TlsStreamInfo>
pub fn get_tls_ref(&self) -> Option<&TlsStreamInfo>
Returns informations about the TLS connection. Returns None
if the
connection was not TLS.
sourcepub fn get_proxy_ref(&self) -> Option<&ProxyProtocolV1Info>
pub fn get_proxy_ref(&self) -> Option<&ProxyProtocolV1Info>
Returns informations about the proxy protocol connection. Returns
None
if the connection was not using the proxy protocol.
sourcepub fn get_peer_addr(&self) -> Option<SocketAddr>
pub fn get_peer_addr(&self) -> Option<SocketAddr>
Returns the remote peer address. Returns None
if the connection was
established via a UNIX domain socket.
Trait Implementations§
source§impl Clone for ConnectionInfo
impl Clone for ConnectionInfo
source§fn clone(&self) -> ConnectionInfo
fn clone(&self) -> ConnectionInfo
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ConnectionInfo
impl !RefUnwindSafe for ConnectionInfo
impl Send for ConnectionInfo
impl Sync for ConnectionInfo
impl Unpin for ConnectionInfo
impl !UnwindSafe for ConnectionInfo
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)