pub struct RootsCapability {
pub list_changed: bool,
}Expand description
Client capability for roots (filesystem access) Capabilities related to filesystem roots.
When list_changed is true, the client supports sending
notifications/roots/list_changed to inform the server that the
available roots have been modified. Servers should re-request the
roots list when they receive this notification.
§Example
use tower_mcp_types::protocol::RootsCapability;
// Client advertising roots with change notification support
let cap = RootsCapability { list_changed: true };
assert!(cap.list_changed);
// The notification method is defined as a constant:
assert_eq!(
tower_mcp_types::protocol::notifications::ROOTS_LIST_CHANGED,
"notifications/roots/list_changed"
);Fields§
§list_changed: boolWhether the client supports roots list changed notifications
Trait Implementations§
Source§impl Clone for RootsCapability
impl Clone for RootsCapability
Source§fn clone(&self) -> RootsCapability
fn clone(&self) -> RootsCapability
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 RootsCapability
impl Debug for RootsCapability
Source§impl Default for RootsCapability
impl Default for RootsCapability
Source§fn default() -> RootsCapability
fn default() -> RootsCapability
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RootsCapability
impl<'de> Deserialize<'de> for RootsCapability
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RootsCapability, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RootsCapability, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for RootsCapability
impl Serialize for RootsCapability
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for RootsCapability
impl RefUnwindSafe for RootsCapability
impl Send for RootsCapability
impl Sync for RootsCapability
impl Unpin for RootsCapability
impl UnsafeUnpin for RootsCapability
impl UnwindSafe for RootsCapability
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