pub struct ConfigBuilder { /* private fields */ }

Implementations

Constructs a new builder that finds the default location

Whether or not to skip reading settings from the system-wide $(prefix)/etc/gitconfig file. This corresponds to setting the GIT_CONFIG_NOSYSTEM environment variable.

Whether or not to respect GIT_CONFIG_COUNT, GIT_CONFIG_KEY_<n>, and GIT_CONFIG_VALUE_<n> environment variables. By default, this is true.

Override the system-wide configuration file location. Providing None or not calling this method will use the default location.

Override the global (user) configuration file location. Providing None or not calling this method will use the default location.

Sets where to read the repository-specific configuration file. This is equivalent to setting GIT_CONFIG. If none is provided, then the builder will look in the default location, .git/config.

Builds a config, ignoring any failed configuration files.

Attempts to build a config, returning error if the environment variable is invalid, if a config file is invalid, or if an overridden config file does not exist. This is only recommended when you have a very controlled system state. Otherwise, this will likely fail more often than you’d like.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.