pub struct UnsubscribeRequest {
pub id: RequestId,
pub params: UnsubscribeRequestParams,
/* private fields */
}Expand description
Sent from the client to request cancellation of resources/updated notifications from the server. This should follow a previous resources/subscribe request.
JSON schema
{
"description": "Sent from the client to request cancellation of resources/updated notifications from the server. This should follow a previous resources/subscribe request.",
"type": "object",
"required": [
"id",
"jsonrpc",
"method",
"params"
],
"properties": {
"id": {
"$ref": "#/$defs/RequestId"
},
"jsonrpc": {
"type": "string",
"const": "2.0"
},
"method": {
"type": "string",
"const": "resources/unsubscribe"
},
"params": {
"$ref": "#/$defs/UnsubscribeRequestParams"
}
}
}Fields§
§id: RequestId§params: UnsubscribeRequestParamsImplementations§
Source§impl UnsubscribeRequest
impl UnsubscribeRequest
pub fn new(id: RequestId, params: UnsubscribeRequestParams) -> Self
pub fn jsonrpc(&self) -> &String
pub fn method(&self) -> &String
Sourcepub fn method_value() -> &'static str
pub fn method_value() -> &'static str
returns “resources/unsubscribe”
pub fn method_name() -> &'static str
👎Deprecated since 0.8.0: Use
method_value() instead.Trait Implementations§
Source§impl Clone for UnsubscribeRequest
impl Clone for UnsubscribeRequest
Source§fn clone(&self) -> UnsubscribeRequest
fn clone(&self) -> UnsubscribeRequest
Returns a duplicate of the value. Read more
1.0.0 · 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 UnsubscribeRequest
impl Debug for UnsubscribeRequest
Source§impl<'de> Deserialize<'de> for UnsubscribeRequest
impl<'de> Deserialize<'de> for UnsubscribeRequest
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 From<UnsubscribeRequest> for ClientRequest
impl From<UnsubscribeRequest> for ClientRequest
Source§fn from(value: UnsubscribeRequest) -> Self
fn from(value: UnsubscribeRequest) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for UnsubscribeRequest
impl RefUnwindSafe for UnsubscribeRequest
impl Send for UnsubscribeRequest
impl Sync for UnsubscribeRequest
impl Unpin for UnsubscribeRequest
impl UnwindSafe for UnsubscribeRequest
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