pub struct IncomingCall<S> { /* private fields */ }Expand description
A validated, decoded call at the user Layer boundary.
Protocol framing and lifecycle state are deliberately absent. Layers can
inspect the stable metadata, application state, and decoded JSON value; a
Layer that intentionally shapes parameters can replace params_mut
without serializing them.
Implementations§
Source§impl<S> IncomingCall<S>
impl<S> IncomingCall<S>
Sourcepub fn request_id(&self) -> Option<&RequestId>
pub fn request_id(&self) -> Option<&RequestId>
The JSON-RPC request ID, or None for a notification.
Sourcepub fn params_mut(&mut self) -> &mut Value
pub fn params_mut(&mut self) -> &mut Value
Mutably borrow the decoded parameters before forwarding the call.
Sourcepub fn context(&self) -> &ServerContext
pub fn context(&self) -> &ServerContext
The framework context for this call.
Sourcepub fn handler_timeout(&self) -> Option<Duration>
pub fn handler_timeout(&self) -> Option<Duration>
The configured timeout for this request, or None for a notification.
Requests begin with the connection’s
ResourcePolicy::handler_timeout.
A Layer may replace it with set_handler_timeout
before forwarding the call.
Sourcepub fn set_handler_timeout(&mut self, timeout: Duration)
pub fn set_handler_timeout(&mut self, timeout: Duration)
Override the timeout applied to this request handler.
Call this synchronously before forwarding the call through Next.
A zero timeout expires the request as soon as dispatch is first polled.
Notifications have no response deadline, so calling this for a
notification has no effect.