pub struct Config {
pub routes: Vec<Route>,
pub budget: Budget,
pub escalation: Escalation,
pub gate_defs: Vec<GateDef>,
}Expand description
Top-level configuration document.
Fields§
§routes: Vec<Route>Ordered routes; first match wins.
budget: BudgetSpend caps.
escalation: EscalationEscalation limits and promotion rules.
gate_defs: Vec<GateDef>User-defined subprocess gates (SPEC §8.1), referenced by id from a route’s gates /
deferred_gates. Declared as [[gate]] sections in TOML.
Implementations§
Source§impl Config
impl Config
Sourcepub fn parse(toml_str: &str) -> Result<Self>
pub fn parse(toml_str: &str) -> Result<Self>
Parse a TOML configuration document.
§Errors
Returns Error::Config on invalid TOML or unknown fields, or Error::InvalidConfig on
an invalid gate definition (not exactly one of cmd/judge, a judge threshold outside
[0,1], or a duplicate/blank id).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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 Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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