pub struct ServerDisconnectContext { /* private fields */ }Expand description
Context passed to server disconnect lifecycle handlers.
Implementations§
Source§impl ServerDisconnectContext
impl ServerDisconnectContext
Sourcepub fn connection_id(&self) -> &str
pub fn connection_id(&self) -> &str
Returns the logical connection id for the disconnected client.
Sourcepub fn peer_addr(&self) -> Option<SocketAddr>
pub fn peer_addr(&self) -> Option<SocketAddr>
Returns the peer socket address when available.
Sourcepub fn server(&self) -> &ServerHandle
pub fn server(&self) -> &ServerHandle
Returns a server handle for outbound event operations.
Trait Implementations§
Source§impl Clone for ServerDisconnectContext
impl Clone for ServerDisconnectContext
Source§fn clone(&self) -> ServerDisconnectContext
fn clone(&self) -> ServerDisconnectContext
Returns a duplicate 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 ServerDisconnectContext
impl !RefUnwindSafe for ServerDisconnectContext
impl Send for ServerDisconnectContext
impl Sync for ServerDisconnectContext
impl Unpin for ServerDisconnectContext
impl UnsafeUnpin for ServerDisconnectContext
impl !UnwindSafe for ServerDisconnectContext
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