pub struct LoadedConfig {
pub config: CliGitConfig,
pub source: Option<PathBuf>,
pub ignored_legacy: Vec<PathBuf>,
}Expand description
What:
The outcome of loading one repository’s configuration.
Option<PathBuf> is “an owned path or nothing”;
Vec<PathBuf> is an owned list.
Why:
Callers need the settings,
the file they came from for diagnostics,
and any
legacy file that was left beside an authoritative JSONC file so they can
report it instead of ignoring it silently.
In TS you’d write (pseudocode):
type LoadedConfig = { config: CliGitConfig; source?: string; ignoredLegacy: string[] };Fields§
§config: CliGitConfigValidated settings;
CliGitConfig::defaults() when the repository has no file.
source: Option<PathBuf>The JSONC file that was read, absent when the repository has none.
ignored_legacy: Vec<PathBuf>Legacy files present beside the JSONC file; never read, to be reported.
Trait Implementations§
Source§impl Clone for LoadedConfig
impl Clone for LoadedConfig
Source§impl Debug for LoadedConfig
impl Debug for LoadedConfig
impl Eq for LoadedConfig
Source§impl PartialEq for LoadedConfig
impl PartialEq for LoadedConfig
impl StructuralPartialEq for LoadedConfig
Auto Trait Implementations§
impl Freeze for LoadedConfig
impl RefUnwindSafe for LoadedConfig
impl Send for LoadedConfig
impl Sync for LoadedConfig
impl Unpin for LoadedConfig
impl UnsafeUnpin for LoadedConfig
impl UnwindSafe for LoadedConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> ⓘ
Converts
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> ⓘ
Converts
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