Skip to main content

Extension

Trait Extension 

Source
pub trait Extension:
    Send
    + Sync
    + 'static {
    // Required method
    fn id(&self) -> &str;

    // Provided method
    fn settings(&self) -> Map<String, Value> { ... }
}
Expand description

A protocol extension supported by the server.

Required Methods§

Source

fn id(&self) -> &str

The extension identifier, e.g. io.modelcontextprotocol/tasks. It must have a vendor prefix ({prefix}/{name}).

Provided Methods§

Source

fn settings(&self) -> Map<String, Value>

The settings object advertised in capabilities.extensions. An empty object means “supported, no settings”.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§