pub struct ConfigProvenance {
pub config_path: Option<PathBuf>,
pub config_exists: bool,
pub xdg_pinned: bool,
pub parse_error: Option<String>,
pub local_path: Option<PathBuf>,
pub local_exists: bool,
pub local_keys: Vec<&'static str>,
pub env_overrides: Vec<EnvOverride>,
}Expand description
Where the effective config comes from — the four shadowing mechanisms behind GH #450, captured in one snapshot.
Fields§
§config_path: Option<PathBuf>Resolved global config.toml path (None only when no config base
resolves, e.g. no HOME).
config_exists: boolWhether that global file currently exists on disk.
xdg_pinned: boolWhether this install is committed to the XDG four-dir layout.
parse_error: Option<String>The global-config parse error, if config.toml exists but is unparseable
(mirrors the fallback-to-defaults Config::load takes).
local_path: Option<PathBuf>Resolved project-local .lean-ctx.toml path, if a project root resolves.
local_exists: boolWhether that project-local file exists and is readable.
local_keys: Vec<&'static str>Editable keys the project-local file overrides (subset of
compression_level / terse_agent / tool_profile).
env_overrides: Vec<EnvOverride>Active environment overrides among the editable settings.
Implementations§
Source§impl ConfigProvenance
impl ConfigProvenance
Sourcepub fn has_shadow(&self) -> bool
pub fn has_shadow(&self) -> bool
true when at least one shadowing source (env override, project-local
override, or parse error) could make a saved global value appear to reset.
Sourcepub fn local_overrides(&self, setting: &str) -> bool
pub fn local_overrides(&self, setting: &str) -> bool
true when setting is overridden by a project-local .lean-ctx.toml.
Trait Implementations§
Source§impl Clone for ConfigProvenance
impl Clone for ConfigProvenance
Source§fn clone(&self) -> ConfigProvenance
fn clone(&self) -> ConfigProvenance
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Forget for ConfigProvenance
impl Freeze for ConfigProvenancewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<&'static str>: Freeze,
PhantomData<EnvOverride>: Freeze,
impl Move for ConfigProvenance
impl RefUnwindSafe for ConfigProvenance
impl Send for ConfigProvenance
impl Sync for ConfigProvenancewhere
RawVecInner: Sync,
impl Unpin for ConfigProvenance
impl UnsafeUnpin for ConfigProvenancewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<&'static str>: UnsafeUnpin,
PhantomData<EnvOverride>: UnsafeUnpin,
impl UnwindSafe for ConfigProvenance
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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