pub struct SubscriptionFilter {
pub tools_list_changed: Option<bool>,
pub prompts_list_changed: Option<bool>,
pub resources_list_changed: Option<bool>,
pub resource_subscriptions: Option<Vec<String>>,
}Expand description
Opt-in filter for which notification types the client wants on this stream.
Each field is independently optional; all-absent means the client wants no notifications (a degenerate but valid case).
Fields§
§tools_list_changed: Option<bool>Receive notifications/tools/list_changed?
prompts_list_changed: Option<bool>Receive notifications/prompts/list_changed?
resources_list_changed: Option<bool>Receive notifications/resources/list_changed?
resource_subscriptions: Option<Vec<String>>Subscribe to per-resource notifications/resources/updated for these
URIs (the former resources/subscribe RPC’s role; that method has no
binding in this crate’s pinned schema).
Implementations§
Source§impl SubscriptionFilter
impl SubscriptionFilter
Sourcepub fn new() -> SubscriptionFilter
pub fn new() -> SubscriptionFilter
Empty filter — server will not send any notifications on this stream.
Sourcepub fn with_tools_list_changed(self, enabled: bool) -> SubscriptionFilter
pub fn with_tools_list_changed(self, enabled: bool) -> SubscriptionFilter
Opts in to notifications/tools/list_changed.
Sourcepub fn with_prompts_list_changed(self, enabled: bool) -> SubscriptionFilter
pub fn with_prompts_list_changed(self, enabled: bool) -> SubscriptionFilter
Opts in to notifications/prompts/list_changed.
Sourcepub fn with_resources_list_changed(self, enabled: bool) -> SubscriptionFilter
pub fn with_resources_list_changed(self, enabled: bool) -> SubscriptionFilter
Opts in to notifications/resources/list_changed.
Sourcepub fn with_resource_subscriptions(
self,
uris: Vec<String>,
) -> SubscriptionFilter
pub fn with_resource_subscriptions( self, uris: Vec<String>, ) -> SubscriptionFilter
Opts in to notifications/resources/updated for the given resource URIs.
Trait Implementations§
Source§impl Clone for SubscriptionFilter
impl Clone for SubscriptionFilter
Source§fn clone(&self) -> SubscriptionFilter
fn clone(&self) -> SubscriptionFilter
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more