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,
}
Expand description
The configuration structure for git-journal.
Fields§
§categories: Vec<String>
Specifies the available categories for the commit message
category_delimiters: Vec<String>
Set the characters where the categories are wrapped in
colored_output: bool
Set to false if the output should not be colored
default_template: Option<String>
Specifies the default template. Will be used for tag validation and printing.
enable_debug: bool
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_commit_hash: bool
Show or hide the commit hash for every entry
show_prefix: bool
Show or hide the commit message prefix, e.g. JIRA-1234
sort_by: String
Sort the commits during the output by “date” (default) or “name”
template_prefix: String
Commit message template prefix which will be added during commit preparation
Implementations§
Source§impl Config
impl Config
Sourcepub fn new() -> Self
pub fn new() -> Self
Constructs a new Config
with default values.
§Examples
use gitjournal::Config;
let config = Config::new();
Sourcepub fn is_default_config(&self) -> bool
pub fn is_default_config(&self) -> bool
Check if the configuration matches with the default one.
§Examples
use gitjournal::Config;
assert_eq!(Config::new().is_default_config(), true);
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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>,
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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
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>
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>
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