Trait branchless::git::ConfigRead[][src]

pub trait ConfigRead {
    fn into_config(self) -> Config;
fn get<V: GetConfigValue<V>, S: AsRef<str>>(
        &self,
        key: S
    ) -> Result<Option<V>>; 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

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.

Get a config key of one of various possible types.

Provided methods

Same as get, but uses a default value if the config key doesn’t exist.

Same as get, but computes a default value if the config key doesn’t exist.

Implementors