pub struct McpConfig {
pub servers: BTreeMap<String, McpServerConfig>,
}Fields§
§servers: BTreeMap<String, McpServerConfig>Implementations§
Source§impl McpConfig
impl McpConfig
pub fn new(servers: BTreeMap<String, McpServerConfig>) -> Self
pub fn from_json_file(path: impl AsRef<Path>) -> Result<Self, ParseError>
pub fn from_json_files<T: AsRef<Path>>(paths: &[T]) -> Result<Self, ParseError>
pub fn from_json(json: &str) -> Result<Self, ParseError>
pub async fn into_servers( self, factories: &HashMap<String, ServerFactory>, vars: &Vars, ) -> Result<Vec<McpServer>, ParseError>
pub async fn into_servers_with_proxy( self, factories: &HashMap<String, ServerFactory>, vars: &Vars, force_proxy: bool, ) -> Result<Vec<McpServer>, ParseError>
pub fn mark_all_proxy(&mut self)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for McpConfig
impl<'de> Deserialize<'de> for McpConfig
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 McpConfig
impl JsonSchema for McpConfig
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 moreAuto Trait Implementations§
impl Freeze for McpConfig
impl RefUnwindSafe for McpConfig
impl Send for McpConfig
impl Sync for McpConfig
impl Unpin for McpConfig
impl UnsafeUnpin for McpConfig
impl UnwindSafe for McpConfig
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