Struct git_cliff_core::changelog::Changelog
source · pub struct Changelog<'a> {
pub releases: Vec<Release<'a>>,
/* private fields */
}
Expand description
Changelog generator.
Fields§
§releases: Vec<Release<'a>>
Releases that the changelog will contain.
Implementations§
source§impl<'a> Changelog<'a>
impl<'a> Changelog<'a>
sourcepub fn new(releases: Vec<Release<'a>>, config: &'a Config) -> Result<Self>
pub fn new(releases: Vec<Release<'a>>, config: &'a Config) -> Result<Self>
Constructs a new instance.
sourcepub fn bump_version(&mut self) -> Result<Option<String>>
pub fn bump_version(&mut self) -> Result<Option<String>>
Increments the version for the unreleased changes based on semver.
sourcepub fn generate<W: Write>(&self, out: &mut W) -> Result<()>
pub fn generate<W: Write>(&self, out: &mut W) -> Result<()>
Generates the changelog and writes it to the given output.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Changelog<'a>
impl<'a> !RefUnwindSafe for Changelog<'a>
impl<'a> Send for Changelog<'a>
impl<'a> Sync for Changelog<'a>
impl<'a> Unpin for Changelog<'a>
impl<'a> !UnwindSafe for Changelog<'a>
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
Mutably borrows from an owned value. Read more