mirror of https://github.com/chipsenkbeil/distant
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
588 B
Rust
18 lines
588 B
Rust
use crate::{ConnectionId, Request, ServerReply};
|
|
use std::sync::Arc;
|
|
|
|
/// Represents contextual information for working with an inbound request
|
|
pub struct ServerCtx<RequestData, ResponseData, LocalData> {
|
|
/// Unique identifer associated with the connection that sent the request
|
|
pub connection_id: ConnectionId,
|
|
|
|
/// The request being handled
|
|
pub request: Request<RequestData>,
|
|
|
|
/// Used to send replies back to be sent out by the server
|
|
pub reply: ServerReply<ResponseData>,
|
|
|
|
/// Reference to the connection's local data
|
|
pub local_data: Arc<LocalData>,
|
|
}
|