pub struct SubscriptionsListenResultMetaObject {
pub subscription_id: RequestId,
pub server_info: Option<Implementation>,
pub extra: HashMap<String, Value>,
}Expand description
_meta for SubscriptionsListenResult. Schema:
SubscriptionsListenResultMetaObject extends ResultMetaObject with a REQUIRED
io.modelcontextprotocol/subscriptionId: RequestId — the id of the
subscriptions/listen request this result closes (equals the result’s
own id in the JSON-RPC envelope). Extending
crate::meta::ResultMetaObject means it also carries the optional
io.modelcontextprotocol/serverInfo.
Serialize is hand-written rather than #[derive] + #[serde(flatten)]:
extra is public and caller-writable, so a caller could otherwise insert
one of the reserved keys into it and produce the same key twice on the
wire. The typed field always wins; a colliding extra entry is dropped
rather than emitted.
Fields§
§subscription_id: RequestIdId of the subscriptions/listen request this result closes.
server_info: Option<Implementation>Identifies the responding server. Optional.
extra: HashMap<String, Value>Additional caller-supplied meta keys per the MetaObject extension rules.
Implementations§
Source§impl SubscriptionsListenResultMetaObject
impl SubscriptionsListenResultMetaObject
Sourcepub fn new(subscription_id: RequestId) -> SubscriptionsListenResultMetaObject
pub fn new(subscription_id: RequestId) -> SubscriptionsListenResultMetaObject
Creates the meta from the id of the closed subscriptions/listen request, with no server info or extra keys.
Sourcepub fn with_server_info(
self,
info: Implementation,
) -> SubscriptionsListenResultMetaObject
pub fn with_server_info( self, info: Implementation, ) -> SubscriptionsListenResultMetaObject
Carry the responding server’s identity on the subscription-close result.
Trait Implementations§
Source§impl Clone for SubscriptionsListenResultMetaObject
impl Clone for SubscriptionsListenResultMetaObject
Source§fn clone(&self) -> SubscriptionsListenResultMetaObject
fn clone(&self) -> SubscriptionsListenResultMetaObject
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more