pub struct RequestContext {Show 15 fields
pub start: Instant,
pub http_method: Method,
pub path: String,
pub request_size: usize,
pub wants_sse: bool,
pub session_id: Option<String>,
pub jsonrpc: Option<ParsedBody>,
pub mcp_method: Option<McpMethod>,
pub mcp_method_str: Option<String>,
pub tool: Option<String>,
pub is_batch: bool,
pub client_info_from_init: Option<ClientInfo>,
pub client_name: Option<String>,
pub client_version: Option<String>,
pub tags: Vec<&'static str>,
}Fields§
§start: Instant§http_method: Method§path: String§request_size: usize§wants_sse: bool§session_id: Option<String>§jsonrpc: Option<ParsedBody>§mcp_method: Option<McpMethod>§mcp_method_str: Option<String>String form for event output. Set to the protocol method for MCP POSTs and overwritten by specific handlers where appropriate (e.g. “SSE”).
tool: Option<String>tools/call tool name; None for other methods.
is_batch: bool§client_info_from_init: Option<ClientInfo>Parsed from initialize params. The Initialize success path stores
this into the session store.
client_name: Option<String>Resolved from the session store by the handler before emit.
client_version: Option<String>Transform tags pushed by handlers / middleware. The emit stage joins
them with + to build the RequestEvent.note field
(e.g. ["rewritten", "sse"] → "rewritten+sse").
Auto Trait Implementations§
impl Freeze for RequestContext
impl RefUnwindSafe for RequestContext
impl Send for RequestContext
impl Sync for RequestContext
impl Unpin for RequestContext
impl UnsafeUnpin for RequestContext
impl UnwindSafe for RequestContext
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