Trait branchless::git::ConfigRead
source · pub trait ConfigRead {
// Required methods
fn into_config(self) -> Config;
fn list<S: AsRef<str>>(
&self,
glob_pattern: S
) -> Result<Vec<(String, String)>>;
fn get<V: GetConfigValue<V>, S: AsRef<str>>(
&self,
key: S
) -> Result<Option<V>>;
// Provided methods
fn get_or<V: GetConfigValue<V>, S: AsRef<str>>(
&self,
key: S,
default: V
) -> Result<V> { ... }
fn get_or_else<V: GetConfigValue<V>, S: AsRef<str>, F: FnOnce() -> V>(
&self,
key: S,
default: F
) -> Result<V> { ... }
}
Expand description
Read-only interface to Git’s configuration.
Required Methods§
sourcefn into_config(self) -> Config
fn into_config(self) -> Config
Convert this object into an owned, writable version of the configuration. You should only use this if you know that it’s safe to write to the underlying configuration file.
Provided Methods§
Object Safety§
This trait is not object safe.