#[non_exhaustive]pub struct ServerCapabilities {
pub experimental: Option<BTreeMap<String, Map<String, Value>>>,
pub extensions: Option<BTreeMap<String, Map<String, Value>>>,
pub logging: Option<Map<String, Value>>,
pub completions: Option<Map<String, Value>>,
pub prompts: Option<PromptsCapability>,
pub resources: Option<ResourcesCapability>,
pub tools: Option<ToolsCapability>,
pub tasks: Option<TasksCapability>,
}Expand description
§Builder
let cap = ServerCapabilities::builder()
.enable_logging()
.enable_experimental()
.enable_prompts()
.enable_resources()
.enable_tools()
.enable_tool_list_changed()
.build();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.experimental: Option<BTreeMap<String, Map<String, Value>>>§extensions: Option<BTreeMap<String, Map<String, Value>>>Optional MCP extensions that the server supports (SEP-1724).
Keys are extension identifiers (e.g., "io.modelcontextprotocol/apps"),
values are per-extension settings objects. An empty object indicates
support with no settings.
logging: Option<Map<String, Value>>§completions: Option<Map<String, Value>>§prompts: Option<PromptsCapability>§resources: Option<ResourcesCapability>§tools: Option<ToolsCapability>§tasks: Option<TasksCapability>Implementations§
Source§impl ServerCapabilities
impl ServerCapabilities
Sourcepub fn builder() -> ServerCapabilitiesBuilder
pub fn builder() -> ServerCapabilitiesBuilder
Create a new ServerCapabilities builder.
Trait Implementations§
Source§impl Clone for ServerCapabilities
impl Clone for ServerCapabilities
Source§fn clone(&self) -> ServerCapabilities
fn clone(&self) -> ServerCapabilities
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 ServerCapabilities
impl Debug for ServerCapabilities
Source§impl Default for ServerCapabilities
impl Default for ServerCapabilities
Source§fn default() -> ServerCapabilities
fn default() -> ServerCapabilities
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ServerCapabilities
impl<'de> Deserialize<'de> for ServerCapabilities
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ServerCapabilities, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ServerCapabilities, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<S> From<ServerCapabilitiesBuilder<S>> for ServerCapabilities
impl<S> From<ServerCapabilitiesBuilder<S>> for ServerCapabilities
Source§fn from(builder: ServerCapabilitiesBuilder<S>) -> ServerCapabilities
fn from(builder: ServerCapabilitiesBuilder<S>) -> ServerCapabilities
Converts to this type from the input type.
Source§impl PartialEq for ServerCapabilities
impl PartialEq for ServerCapabilities
Source§impl Serialize for ServerCapabilities
impl Serialize for ServerCapabilities
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
impl StructuralPartialEq for ServerCapabilities
Auto Trait Implementations§
impl Freeze for ServerCapabilities
impl RefUnwindSafe for ServerCapabilities
impl Send for ServerCapabilities
impl Sync for ServerCapabilities
impl Unpin for ServerCapabilities
impl UnsafeUnpin for ServerCapabilities
impl UnwindSafe for ServerCapabilities
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