pub struct Server {
pub schema: i64,
pub id: String,
pub body: ServerBody,
pub enable: Option<Enable>,
pub extra: Table,
}Expand description
store/servers/<id>.toml: one MCP server.
Fields§
§schema: i64Schema version; always 1.
id: StringServer id; equals the file name.
body: ServerBody§enable: Option<Enable>System scope (user-wide) enablement.
extra: TableImplementations§
Source§impl Server
impl Server
Sourcepub fn validate(&self, file_id: Option<&str>) -> Diagnostics
pub fn validate(&self, file_id: Option<&str>) -> Diagnostics
Validates per SPEC 5.2. file_id is the file name without .toml.
Sourcepub fn set_clients(&mut self, clients: Option<ClientSelection>)
pub fn set_clients(&mut self, clients: Option<ClientSelection>)
Sets [enable] clients (None removes it), keeping the table’s
other keys; a table left empty is removed.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Server
impl<'de> Deserialize<'de> for Server
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
Source§impl JsonSchema for Server
impl JsonSchema for Server
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl StoreModel for Server
impl StoreModel for Server
Source§const SCHEMA_NAME: &'static str = "server"
const SCHEMA_NAME: &'static str = "server"
File stem of the generated JSON Schema:
docs/schema/<NAME>.schema.json.impl StructuralPartialEq for Server
Auto Trait Implementations§
impl Forget for Server
impl Freeze for Serverwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
*const LeafNode<String, String> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, String)>>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
*const LeafNode<String, ServerOverride> is !null: Freeze,
PhantomData<Box<(String, ServerOverride)>>: Freeze,
*const LeafNode<String, Map<String, Value>> is !null: Freeze,
PhantomData<Box<(String, Map<String, Value>)>>: Freeze,
impl Move for Server
impl RefUnwindSafe for Server
impl Send for Serverwhere
RawVecInner: Send,
NodeRef<Owned, String, String, LeafOrInternal>: Send,
BoxRaw<(String, String)>: Send,
NodeRef<Owned, String, Value, LeafOrInternal>: Send,
BoxRaw<(String, Value)>: Send,
NodeRef<Owned, String, ServerOverride, LeafOrInternal>: Send,
BoxRaw<(String, ServerOverride)>: Send,
NodeRef<Owned, String, Map<String, Value>, LeafOrInternal>: Send,
BoxRaw<(String, Map<String, Value>)>: Send,
impl Sync for Serverwhere
RawVecInner: Sync,
NodeRef<Owned, String, String, LeafOrInternal>: Sync,
BoxRaw<(String, String)>: Sync,
NodeRef<Owned, String, Value, LeafOrInternal>: Sync,
BoxRaw<(String, Value)>: Sync,
NodeRef<Owned, String, ServerOverride, LeafOrInternal>: Sync,
BoxRaw<(String, ServerOverride)>: Sync,
NodeRef<Owned, String, Map<String, Value>, LeafOrInternal>: Sync,
BoxRaw<(String, Map<String, Value>)>: Sync,
impl Unpin for Serverwhere
*const u8 is !null: Unpin,
*const LeafNode<String, String> is !null: Unpin,
Box<(String, String)>: Unpin,
*const LeafNode<String, Value> is !null: Unpin,
Box<(String, Value)>: Unpin,
*const LeafNode<String, ServerOverride> is !null: Unpin,
Box<(String, ServerOverride)>: Unpin,
*const LeafNode<String, Map<String, Value>> is !null: Unpin,
Box<(String, Map<String, Value>)>: Unpin,
impl UnsafeUnpin for Serverwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
*const LeafNode<String, String> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, String)>>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
*const LeafNode<String, ServerOverride> is !null: UnsafeUnpin,
PhantomData<Box<(String, ServerOverride)>>: UnsafeUnpin,
*const LeafNode<String, Map<String, Value>> is !null: UnsafeUnpin,
PhantomData<Box<(String, Map<String, Value>)>>: UnsafeUnpin,
impl UnwindSafe for Serverwhere
RawVecInner: UnwindSafe,
BTreeMap<String, String>: UnwindSafe,
BTreeMap<String, Value>: UnwindSafe,
BTreeMap<String, ServerOverride>: UnwindSafe,
BTreeMap<String, Map<String, Value>>: UnwindSafe,
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