pub struct ForgeConfig {
pub servers: HashMap<String, ServerConfig>,
pub sandbox: SandboxOverrides,
pub groups: HashMap<String, GroupConfig>,
}Expand description
Top-level Forge configuration.
Fields§
§servers: HashMap<String, ServerConfig>Downstream MCP server configurations, keyed by server name.
sandbox: SandboxOverridesSandbox execution settings.
groups: HashMap<String, GroupConfig>Server group definitions for cross-server data flow policies.
Implementations§
Source§impl ForgeConfig
impl ForgeConfig
Sourcepub fn from_toml(toml_str: &str) -> Result<Self, ConfigError>
pub fn from_toml(toml_str: &str) -> Result<Self, ConfigError>
Parse a config from a TOML string.
Sourcepub fn from_file(path: &Path) -> Result<Self, ConfigError>
pub fn from_file(path: &Path) -> Result<Self, ConfigError>
Load config from a file path.
Sourcepub fn from_toml_with_env(toml_str: &str) -> Result<Self, ConfigError>
pub fn from_toml_with_env(toml_str: &str) -> Result<Self, ConfigError>
Parse a config from a TOML string, expanding ${ENV_VAR} references.
Sourcepub fn from_file_with_env(path: &Path) -> Result<Self, ConfigError>
pub fn from_file_with_env(path: &Path) -> Result<Self, ConfigError>
Load config from a file path, expanding environment variables.
Trait Implementations§
Source§impl Clone for ForgeConfig
impl Clone for ForgeConfig
Source§fn clone(&self) -> ForgeConfig
fn clone(&self) -> ForgeConfig
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 ForgeConfig
impl Debug for ForgeConfig
Source§impl<'de> Deserialize<'de> for ForgeConfig
impl<'de> Deserialize<'de> for ForgeConfig
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
Auto Trait Implementations§
impl Freeze for ForgeConfig
impl RefUnwindSafe for ForgeConfig
impl Send for ForgeConfig
impl Sync for ForgeConfig
impl Unpin for ForgeConfig
impl UnsafeUnpin for ForgeConfig
impl UnwindSafe for ForgeConfig
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