Struct jj_cli::config::LayeredConfigs
source · pub struct LayeredConfigs { /* private fields */ }Expand description
Set of configs which can be merged as needed.
Sources from the lowest precedence:
- Default
- Base environment variables
- User config
- Repo config
.jj/repo/config.toml - TODO: Workspace config
.jj/config.toml - Override environment variables
- Command-line arguments
--config-toml
Implementations§
source§impl LayeredConfigs
impl LayeredConfigs
sourcepub fn from_environment(default: Config) -> Self
pub fn from_environment(default: Config) -> Self
Initializes configs with infallible sources.
pub fn read_user_config(&mut self) -> Result<(), ConfigError>
pub fn read_repo_config(&mut self, repo_path: &Path) -> Result<(), ConfigError>
pub fn parse_config_args( &mut self, toml_strs: &[String] ) -> Result<(), ConfigError>
pub fn sources(&self) -> Vec<(ConfigSource, &Config)>
pub fn resolved_config_values( &self, filter_prefix: &[&str] ) -> Result<Vec<AnnotatedValue>, ConfigError>
Trait Implementations§
source§impl Clone for LayeredConfigs
impl Clone for LayeredConfigs
source§fn clone(&self) -> LayeredConfigs
fn clone(&self) -> LayeredConfigs
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LayeredConfigs
impl !RefUnwindSafe for LayeredConfigs
impl Send for LayeredConfigs
impl Sync for LayeredConfigs
impl Unpin for LayeredConfigs
impl !UnwindSafe for LayeredConfigs
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> 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