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 !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