pub struct ServerConnectionContext { /* private fields */ }Expand description
Context passed to server connection lifecycle handlers.
Implementations§
Source§impl ServerConnectionContext
impl ServerConnectionContext
Sourcepub fn connection_id(&self) -> &str
pub fn connection_id(&self) -> &str
Returns the logical connection id for the current 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 ServerConnectionContext
impl Clone for ServerConnectionContext
Source§fn clone(&self) -> ServerConnectionContext
fn clone(&self) -> ServerConnectionContext
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 ServerConnectionContext
impl !RefUnwindSafe for ServerConnectionContext
impl Send for ServerConnectionContext
impl Sync for ServerConnectionContext
impl Unpin for ServerConnectionContext
impl UnsafeUnpin for ServerConnectionContext
impl !UnwindSafe for ServerConnectionContext
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