pub struct TruthMirrorConfig {
pub ledger_dir: String,
pub allow_same_model: bool,
pub default_writer: String,
pub pairs: BTreeMap<String, AdversarialPair>,
pub strict: StrictConfig,
pub gates: GatesConfig,
pub ground_truth: GroundTruthConfig,
pub history: HistoryConfig,
pub enforcement: EnforcementConfig,
pub review: Option<LegacyReview>,
}Fields§
§ledger_dir: String§allow_same_model: bool§default_writer: StringWriter harness assumed when none is provided on the CLI or commit trailer.
pairs: BTreeMap<String, AdversarialPair>Adversarial pairs keyed by writer harness (lowercase). Empty in the parsed
form when [pairs] is absent; normalize fills defaults / folds legacy.
strict: StrictConfig§gates: GatesConfig§ground_truth: GroundTruthConfig§history: HistoryConfig§enforcement: EnforcementConfig§review: Option<LegacyReview>Legacy [review] block, folded into pairs on load for back-compat.
Implementations§
Source§impl TruthMirrorConfig
impl TruthMirrorConfig
pub fn load_for_cli( explicit_path: Option<&Path>, state_dir: &Path, ) -> Result<Self, ConfigError>
pub fn load_or_default(path: impl Into<PathBuf>) -> Result<Self, ConfigError>
pub fn from_toml_str(path: &Path, contents: &str) -> Result<Self, ConfigError>
Sourcepub fn pair_for(&self, writer_harness: &str) -> Option<&AdversarialPair>
pub fn pair_for(&self, writer_harness: &str) -> Option<&AdversarialPair>
The adversarial pair for a writer harness (case-insensitive).
pub fn default_path(state_dir: &Path) -> PathBuf
Trait Implementations§
Source§impl Clone for TruthMirrorConfig
impl Clone for TruthMirrorConfig
Source§fn clone(&self) -> TruthMirrorConfig
fn clone(&self) -> TruthMirrorConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TruthMirrorConfig
impl Debug for TruthMirrorConfig
Source§impl Default for TruthMirrorConfig
impl Default for TruthMirrorConfig
Source§impl<'de> Deserialize<'de> for TruthMirrorConfig
impl<'de> Deserialize<'de> for TruthMirrorConfig
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
impl Eq for TruthMirrorConfig
Source§impl PartialEq for TruthMirrorConfig
impl PartialEq for TruthMirrorConfig
Source§fn eq(&self, other: &TruthMirrorConfig) -> bool
fn eq(&self, other: &TruthMirrorConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TruthMirrorConfig
impl Serialize for TruthMirrorConfig
impl StructuralPartialEq for TruthMirrorConfig
Auto Trait Implementations§
impl Freeze for TruthMirrorConfig
impl RefUnwindSafe for TruthMirrorConfig
impl Send for TruthMirrorConfig
impl Sync for TruthMirrorConfig
impl Unpin for TruthMirrorConfig
impl UnsafeUnpin for TruthMirrorConfig
impl UnwindSafe for TruthMirrorConfig
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