pub struct Configuration {
pub delimiter: String,
pub grammar: Grammar,
pub buckets: Vec<String>,
pub fallback_bucket: Option<String>,
pub renderer: Renderer,
}Expand description
The harvest configuration.
git-harvest has no separate configuration file: these settings live in
the CHANGELOG document, and Configuration::default is what
git-harvest init writes into a fresh one.
Fields§
§delimiter: StringThe token separating a bucket from its entry under
Grammar::Delimited.
grammar: GrammarHow a commit subject encodes its bucket.
buckets: Vec<String>The buckets a change may be filed under, in rendering order.
fallback_bucket: Option<String>The bucket for a change whose commit names none, where one is wanted.
renderer: RendererThe shape the assembled CHANGELOG is rendered in.
Implementations§
Source§impl Configuration
impl Configuration
Sourcepub fn parse(&self, subject: &str) -> Option<(String, String)>
pub fn parse(&self, subject: &str) -> Option<(String, String)>
Parse a commit subject into a (bucket, entry text) pair.
Returns None when the subject names no known bucket and no
fallback_bucket is set, or when the entry text is empty. Under
Grammar::Delimited the bucket is what precedes delimiter; under
Grammar::Bracketed it is what a leading [..] encloses.
Trait Implementations§
Source§impl Clone for Configuration
impl Clone for Configuration
Source§fn clone(&self) -> Configuration
fn clone(&self) -> Configuration
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Configuration
impl Debug for Configuration
Source§impl Default for Configuration
impl Default for Configuration
Source§impl<'de> Deserialize<'de> for Configuration
impl<'de> Deserialize<'de> for Configuration
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 Eq for Configuration
Source§impl PartialEq for Configuration
impl PartialEq for Configuration
Source§impl Serialize for Configuration
impl Serialize for Configuration
impl StructuralPartialEq for Configuration
Auto Trait Implementations§
impl Freeze for Configuration
impl RefUnwindSafe for Configuration
impl Send for Configuration
impl Sync for Configuration
impl Unpin for Configuration
impl UnsafeUnpin for Configuration
impl UnwindSafe for Configuration
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.