pub enum SearchMode {
Merge,
FirstMatch,
}Expand description
How found config files are resolved into configuration.
Controls what happens after SearchPath entries have been expanded into
directories and checked for config files. Both modes use the same
priority-ascending ordering — the search path list does not need to change
when switching modes.
See the module-level documentation for use-case examples.
Variants§
Merge
Merge all found config files, with later (higher-priority) files overriding earlier ones via deep merge.
This is the default. Use it when configs are sparse overlays
(e.g. a project config overrides only output_format while the global
config provides the rest).
FirstMatch
Use only the single highest-priority config file found.
Searches from the highest-priority end of the list and stops at the first file that exists. Use it when configs are self-contained and should not be layered (e.g. a code formatter whose project config replaces the global one entirely).
Trait Implementations§
Source§impl Clone for SearchMode
impl Clone for SearchMode
Source§fn clone(&self) -> SearchMode
fn clone(&self) -> SearchMode
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 SearchMode
impl Debug for SearchMode
Source§impl Default for SearchMode
impl Default for SearchMode
Source§fn default() -> SearchMode
fn default() -> SearchMode
Source§impl PartialEq for SearchMode
impl PartialEq for SearchMode
Source§fn eq(&self, other: &SearchMode) -> bool
fn eq(&self, other: &SearchMode) -> bool
self and other values to be equal, and is used by ==.