pub fn is_cancel_request_notification<N: JsonRpcNotification>(
notification: &N,
) -> boolAvailable on crate feature
unstable_cancel_request only.Expand description
Whether a notification is a $/cancel_request, even when it is still
wrapped in _proxy/successor envelopes.
$/cancel_request is connection-scoped: its requestId was allocated on
the connection the notification arrived over and means nothing on any
other connection. Generic forwarding code (such as
ConnectionTo::send_proxied_message_to) uses this check to drop the raw
notification instead of tunneling it across a hop; the cancellation still
propagates because forward_response_to
re-issues it with the forwarded request’s own ID.
Checking a notification whose method is not the successor envelope is a plain method-name comparison. Only successor-wrapped notifications pay for a serialization to peel the envelope.