pub struct ServerContext { /* private fields */ }Expand description
Context for network handlers to interact with the server.
Implementations§
Source§impl ServerContext
impl ServerContext
Sourcepub fn send_to(&self, conn_id: ConnectionId, data: &[u8]) -> Result<()>
pub fn send_to(&self, conn_id: ConnectionId, data: &[u8]) -> Result<()>
Send data to a specific connection.
Sourcepub fn close_connection(&self, conn_id: ConnectionId) -> Result<()>
pub fn close_connection(&self, conn_id: ConnectionId) -> Result<()>
Close a specific connection.
Auto Trait Implementations§
impl !Freeze for ServerContext
impl RefUnwindSafe for ServerContext
impl Send for ServerContext
impl Sync for ServerContext
impl Unpin for ServerContext
impl UnsafeUnpin for ServerContext
impl UnwindSafe for ServerContext
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