#[non_exhaustive]pub struct SubscriptionAcknowledgedParams {
pub notifications: SubscriptionFilter,
pub meta: Option<Value>,
}Expand description
The params of the FIRST frame on a listen stream.
// schema/draft/schema.ts:1358-1366
export interface SubscriptionsAcknowledgedNotificationParams extends NotificationParams {
notifications: SubscriptionFilter; // REQUIRED
}Ordering MUST, verbatim from the draft: “This notification MUST be the first
message the server sends carrying the subscription’s ID in
io.modelcontextprotocol/subscriptionId. The server MUST NOT send any
notification on the subscription before acknowledging it.”
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.notifications: SubscriptionFilterThe subset of requested notification types the server AGREED to honor.
Never a superset of what the client requested: an unsupported requested type is omitted from this set.
meta: Option<Value>Reserved metadata carrying SUBSCRIPTION_ID_META_KEY.
Implementations§
Source§impl SubscriptionAcknowledgedParams
impl SubscriptionAcknowledgedParams
Sourcepub fn new(
notifications: SubscriptionFilter,
subscription_id: &RequestId,
) -> Self
pub fn new( notifications: SubscriptionFilter, subscription_id: &RequestId, ) -> Self
Build an acknowledgement for subscription_id honoring notifications.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SubscriptionAcknowledgedParams
impl<'de> Deserialize<'de> for SubscriptionAcknowledgedParams
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
impl Eq for SubscriptionAcknowledgedParams
impl StructuralPartialEq for SubscriptionAcknowledgedParams
Auto Trait Implementations§
impl Freeze for SubscriptionAcknowledgedParams
impl RefUnwindSafe for SubscriptionAcknowledgedParams
impl Send for SubscriptionAcknowledgedParams
impl Sync for SubscriptionAcknowledgedParams
impl Unpin for SubscriptionAcknowledgedParams
impl UnsafeUnpin for SubscriptionAcknowledgedParams
impl UnwindSafe for SubscriptionAcknowledgedParams
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.