pub struct SubscriptionsListenRequest {
pub id: RequestId,
pub params: SubscriptionsListenRequestParams,
/* private fields */
}Expand description
Latest MCP Protocol 2026_07_28 Sent from the client to open a long-lived channel for receiving notifications outside the context of a specific request. Replaces the previous HTTP GET endpoint and ensures consistent behavior between HTTP and STDIO.
JSON schema
{
"description": "Sent from the client to open a long-lived channel for receiving notifications\noutside the context of a specific request. Replaces the previous HTTP GET\nendpoint and ensures consistent behavior between HTTP and STDIO.",
"type": "object",
"required": [
"id",
"jsonrpc",
"method",
"params"
],
"properties": {
"id": {
"$ref": "#/$defs/RequestId"
},
"jsonrpc": {
"type": "string",
"const": "2.0"
},
"method": {
"type": "string",
"const": "subscriptions/listen"
},
"params": {
"$ref": "#/$defs/SubscriptionsListenRequestParams"
}
}
}Fields§
§id: RequestId§params: SubscriptionsListenRequestParamsImplementations§
Source§impl SubscriptionsListenRequest
impl SubscriptionsListenRequest
pub fn new(id: RequestId, params: SubscriptionsListenRequestParams) -> Self
pub fn jsonrpc(&self) -> &String
pub fn method(&self) -> &String
Sourcepub fn method_value() -> &'static str
pub fn method_value() -> &'static str
returns “subscriptions/listen”
pub fn method_name() -> &'static str
👎Deprecated since 0.8.0:
Use method_value() instead.
Trait Implementations§
Source§impl Clone for SubscriptionsListenRequest
impl Clone for SubscriptionsListenRequest
Source§fn clone(&self) -> SubscriptionsListenRequest
fn clone(&self) -> SubscriptionsListenRequest
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 SubscriptionsListenRequest
impl Debug for SubscriptionsListenRequest
Source§impl<'de> Deserialize<'de> for SubscriptionsListenRequest
impl<'de> Deserialize<'de> for SubscriptionsListenRequest
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<SubscriptionsListenRequest> for ClientRequest
impl From<SubscriptionsListenRequest> for ClientRequest
Source§fn from(value: SubscriptionsListenRequest) -> Self
fn from(value: SubscriptionsListenRequest) -> Self
Converts to this type from the input type.
Source§impl From<SubscriptionsListenRequest> for ClientJsonrpcRequest
impl From<SubscriptionsListenRequest> for ClientJsonrpcRequest
Source§fn from(value: SubscriptionsListenRequest) -> Self
fn from(value: SubscriptionsListenRequest) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SubscriptionsListenRequest
impl RefUnwindSafe for SubscriptionsListenRequest
impl Send for SubscriptionsListenRequest
impl Sync for SubscriptionsListenRequest
impl Unpin for SubscriptionsListenRequest
impl UnsafeUnpin for SubscriptionsListenRequest
impl UnwindSafe for SubscriptionsListenRequest
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