pub struct ConfigFile {
pub defaults: Defaults,
pub priorities: Vec<Priority>,
pub ignore: Vec<String>,
pub include: Vec<String>,
}
Expand description
Configuration file structure
Fields§
§defaults: Defaults
Default settings
priorities: Vec<Priority>
File priority configurations
ignore: Vec<String>
Ignore patterns beyond .gitignore and .digestignore
include: Vec<String>
Include patterns to force inclusion
Implementations§
Source§impl ConfigFile
impl ConfigFile
Sourcepub fn load_from_file(path: &Path) -> Result<Self, CodeDigestError>
pub fn load_from_file(path: &Path) -> Result<Self, CodeDigestError>
Load configuration from a file
Sourcepub fn load_default() -> Result<Option<Self>, CodeDigestError>
pub fn load_default() -> Result<Option<Self>, CodeDigestError>
Load configuration from default locations
Sourcepub fn apply_to_cli_config(&self, cli_config: &mut CliConfig)
pub fn apply_to_cli_config(&self, cli_config: &mut CliConfig)
Apply configuration defaults to CLI config
Trait Implementations§
Source§impl Clone for ConfigFile
impl Clone for ConfigFile
Source§fn clone(&self) -> ConfigFile
fn clone(&self) -> ConfigFile
Returns a duplicate 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 moreSource§impl Debug for ConfigFile
impl Debug for ConfigFile
Source§impl Default for ConfigFile
impl Default for ConfigFile
Source§fn default() -> ConfigFile
fn default() -> ConfigFile
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ConfigFile
impl<'de> Deserialize<'de> for ConfigFile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ConfigFile
impl RefUnwindSafe for ConfigFile
impl Send for ConfigFile
impl Sync for ConfigFile
impl Unpin for ConfigFile
impl UnwindSafe for ConfigFile
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<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