pub struct ValidatedConfig { /* private fields */ }Expand description
Configuration that has passed Config::validate (JOE-1779 / JOE-1654).
Implementations§
Source§impl ValidatedConfig
impl ValidatedConfig
Sourcepub fn try_from_config(cfg: Config) -> Result<Self>
pub fn try_from_config(cfg: Config) -> Result<Self>
Validate and wrap a raw runtime config.
Sourcepub fn load_from(path: &Path) -> Result<Self>
pub fn load_from(path: &Path) -> Result<Self>
Load an optional path (missing → defaults) then validate.
Sourcepub fn load_from_required(path: &Path) -> Result<Self>
pub fn load_from_required(path: &Path) -> Result<Self>
Load a required path then validate.
pub fn as_config(&self) -> &Config
Sourcepub fn into_config(self) -> Config
pub fn into_config(self) -> Config
Consume into the underlying config (already validated).
Sourcepub fn provider_secret(&self, id: &ProviderId) -> Option<SecretString>
pub fn provider_secret(&self, id: &ProviderId) -> Option<SecretString>
Provider-scoped secret for crate::provider_platform::ProviderBuildContext (JOE-1935).
Sourcepub fn with_local_only(self, local_only: bool) -> Result<Self>
pub fn with_local_only(self, local_only: bool) -> Result<Self>
Set offline policy and re-validate (fail closed on remote providers).
Sourcepub fn apply_cli(
self,
provider: Option<&str>,
model: Option<&str>,
language: Option<&str>,
output: Option<&str>,
output_file: Option<&Path>,
timestamps: bool,
verbose: bool,
cleanup: Option<&str>,
cleanup_provider: Option<&str>,
cleanup_model: Option<&str>,
) -> Result<Self>
pub fn apply_cli( self, provider: Option<&str>, model: Option<&str>, language: Option<&str>, output: Option<&str>, output_file: Option<&Path>, timestamps: bool, verbose: bool, cleanup: Option<&str>, cleanup_provider: Option<&str>, cleanup_model: Option<&str>, ) -> Result<Self>
Apply CLI overrides then re-validate (fail closed).
Methods from Deref<Target = Config>§
Sourcepub fn openrouter_api_key_exposed(&self) -> Option<String>
pub fn openrouter_api_key_exposed(&self) -> Option<String>
Expose the OpenRouter API key as a plain string for provider construction.
Sourcepub fn provider_secret(&self, id: &ProviderId) -> Option<SecretString>
pub fn provider_secret(&self, id: &ProviderId) -> Option<SecretString>
Provider-scoped secret for build-context construction (JOE-1935).
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Validate provider/model/style/limit cross-fields (JOE-1608 / JOE-1935).
Sourcepub fn validate_tts_custom_models(&self) -> Result<()>
pub fn validate_tts_custom_models(&self) -> Result<()>
Validate [[tts.custom_models]] uniqueness and reserved namespaces.
Sourcepub fn effective_diagnostic(&self) -> EffectiveConfigDiagnostic
pub fn effective_diagnostic(&self) -> EffectiveConfigDiagnostic
Redacted diagnostic view for --print-effective-config (JOE-1608 / JOE-1935).
Sourcepub fn resolve_model(&self, model_explicitly_set: bool) -> Result<String>
pub fn resolve_model(&self, model_explicitly_set: bool) -> Result<String>
Resolve the effective model for the active provider.
Trait Implementations§
Source§impl AsRef<Config> for ValidatedConfig
impl AsRef<Config> for ValidatedConfig
Source§impl Clone for ValidatedConfig
impl Clone for ValidatedConfig
Source§fn clone(&self) -> ValidatedConfig
fn clone(&self) -> ValidatedConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ValidatedConfig
impl Debug for ValidatedConfig
Auto Trait Implementations§
impl Freeze for ValidatedConfig
impl RefUnwindSafe for ValidatedConfig
impl Send for ValidatedConfig
impl Sync for ValidatedConfig
impl Unpin for ValidatedConfig
impl UnsafeUnpin for ValidatedConfig
impl UnwindSafe for ValidatedConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more