#[non_exhaustive]pub enum ProtocolLevelNotification {
CancelRequestNotification(CancelRequestNotification),
}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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
CancelRequestNotification(CancelRequestNotification)
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:
- MAY 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
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl IntoV2 for ProtocolLevelNotification
Available on crate feature unstable_protocol_v2 only.
impl IntoV2 for ProtocolLevelNotification
Available on crate feature
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>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for ProtocolLevelNotification
impl RefUnwindSafe for ProtocolLevelNotification
impl Send for ProtocolLevelNotification
impl Sync for ProtocolLevelNotification
impl Unpin for ProtocolLevelNotification
impl UnsafeUnpin for ProtocolLevelNotification
impl UnwindSafe for ProtocolLevelNotification
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.