#[non_exhaustive]pub enum ProtocolLevelNotification {
CancelRequestNotification(CancelRequestNotification),
}unstable_cancel_request only.Expand description
General protocol-level notifications that all sides are expected to implement.
Notifications whose methods start with ‘$/’ are messages which
are protocol implementation dependent and might not be implementable in all
clients or agents. For example if the implementation uses a single threaded
synchronous programming language then there is little it can do to react to
a $/cancel_request notification. If an agent or client receives
notifications starting with ‘$/’ it is free to ignore the notification.
Notifications do not expect a response.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CancelRequestNotification(CancelRequestNotification)
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Cancels an ongoing request.
This is a notification sent by the side that sent a request to cancel that request.
Upon receiving this notification, the receiver:
- MUST cancel the corresponding request activity and all nested activities
- MAY send any pending notifications.
- MUST send one of these responses for the original request:
- Valid response with appropriate data (partial results or cancellation marker)
- Error response with code
-32800(Cancelled)
See protocol docs: Cancellation
Implementations§
Trait Implementations§
Source§impl Clone for ProtocolLevelNotification
impl Clone for ProtocolLevelNotification
Source§fn clone(&self) -> ProtocolLevelNotification
fn clone(&self) -> ProtocolLevelNotification
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProtocolLevelNotification
impl Debug for ProtocolLevelNotification
Source§impl<'de> Deserialize<'de> for ProtocolLevelNotification
impl<'de> Deserialize<'de> for ProtocolLevelNotification
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl IntoV2 for ProtocolLevelNotification
Available on crate feature unstable_protocol_v2 only.
impl IntoV2 for ProtocolLevelNotification
unstable_protocol_v2 only.Source§impl JsonSchema for ProtocolLevelNotification
impl JsonSchema for ProtocolLevelNotification
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more