Struct distant_net::server::ServerCtx
source · pub struct ServerCtx<T, U, D> {
pub connection_id: ConnectionId,
pub request: Request<T>,
pub reply: ServerReply<U>,
pub local_data: Arc<D>,
}Expand description
Represents contextual information for working with an inbound request
Fields
connection_id: ConnectionIdUnique identifer associated with the connection that sent the request
request: Request<T>The request being handled
reply: ServerReply<U>Used to send replies back to be sent out by the server
local_data: Arc<D>Reference to the connection’s local data
Auto Trait Implementations
impl<T, U, D> !RefUnwindSafe for ServerCtx<T, U, D>
impl<T, U, D> Send for ServerCtx<T, U, D>where
D: Send + Sync,
T: Send,
U: Send,
impl<T, U, D> Sync for ServerCtx<T, U, D>where
D: Send + Sync,
T: Sync,
U: Send,
impl<T, U, D> Unpin for ServerCtx<T, U, D>where
T: Unpin,
impl<T, U, D> !UnwindSafe for ServerCtx<T, U, D>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more