pub struct Config {
pub categories: Vec<String>,
pub category_delimiters: Vec<String>,
pub colored_output: bool,
pub default_template: Option<String>,
pub enable_debug: bool,
pub excluded_commit_tags: Vec<String>,
pub enable_footers: bool,
pub show_commit_hash: bool,
pub show_prefix: bool,
pub sort_by: String,
pub template_prefix: String,
}
The configuration structure for git-journal.
Specifies the available categories for the commit message
Set the characters where the categories are wrapped in
Set to false if the output should not be colored
Specifies the default template. Will be used for tag validation and
printing.
Show or hide the debug messages like [OKAY] ...
or [INFO] ...
Excluded tags in an array, e.g. "internal"
Enable or disable the output and accumulation of commit footers
Show or hide the commit hash for every entry
Show or hide the commit message prefix, e.g. JIRA-1234
Sort the commits during the output by "date" (default) or "name"
Commit message template prefix which will be added during commit
preparation
Constructs a new Config
with default values.
use gitjournal::Config;
let config = Config::new();
Save the default configuration file in a certain path.
use gitjournal::Config;
Config::new()
.save_default_config(".")
.expect("Could not save config.");
When toml encoding or file creation failed.
Load a configuration file from a certain path.
use gitjournal::Config;
Config::new().load(".").expect("Could not load config.");
When toml decoding or file opening failed.
Check if the configuration matches with the default one.
use gitjournal::Config;
assert_eq!(Config::new().is_default_config(), true);
Returns the "default value" for a type. Read more
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Serialize this value into the given Serde serializer. Read more
Deserialize this value from the given Serde deserializer. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static