pub struct ServerConfig {
pub transport: ServerTransport,
pub exposure: Option<McpExposure>,
pub description: Option<String>,
pub tool_exposure: IndexMap<String, McpExposure>,
pub enabled: Option<bool>,
pub timeout: Option<f64>,
}Expand description
One validated server entry.
Fields§
§transport: ServerTransportTransport settings.
exposure: Option<McpExposure>Default exposure of its tools.
description: Option<String>What the server offers, in a sentence.
tool_exposure: IndexMap<String, McpExposure>Exposure of single tools by name or * pattern, in file order.
enabled: Option<bool>false keeps the entry without connecting.
timeout: Option<f64>Per-request timeout in seconds.
Implementations§
Source§impl ServerConfig
impl ServerConfig
Sourcepub fn exposure(&self) -> McpExposure
pub fn exposure(&self) -> McpExposure
The server’s exposure, codemode by default.
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Whether it connects.
Sourcepub fn tool_exposure(&self, tool: &str) -> McpExposure
pub fn tool_exposure(&self, tool: &str) -> McpExposure
pi’s getMcpToolExposure: an exact toolExposure entry, else the
first matching pattern, else the server’s exposure.
Sourcepub fn exposures(&self) -> Vec<McpExposure>
pub fn exposures(&self) -> Vec<McpExposure>
Every exposure its tools can have, known before it connects.
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§impl Debug for ServerConfig
impl Debug for ServerConfig
Source§impl PartialEq for ServerConfig
impl PartialEq for ServerConfig
impl StructuralPartialEq for ServerConfig
Auto Trait Implementations§
impl Forget for ServerConfig
impl Freeze for ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnsafeUnpin for ServerConfig
impl UnwindSafe for ServerConfig
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