pub(crate) struct ChangelogEdit {
path: RepositoryPath,
before: Option<Vec<u8>>,
contents: String,
}Expand description
A unit changelog read from the repository, with the edit that adds a release entry to it.
Fields§
§path: RepositoryPath§before: Option<Vec<u8>>§contents: StringImplementations§
Source§impl ChangelogEdit
impl ChangelogEdit
Sourcepub(crate) fn read(
root: &RepositoryRoot,
path: &RepositoryPath,
) -> Result<Self, ReadError>
pub(crate) fn read( root: &RepositoryRoot, path: &RepositoryPath, ) -> Result<Self, ReadError>
Read the changelog at path. An absent file reads as an empty
changelog.
Sourcepub(crate) fn render(
&self,
version: &str,
date: &str,
entry: &Entry,
) -> Result<Self, MissingUnreleased>
pub(crate) fn render( &self, version: &str, date: &str, entry: &Entry, ) -> Result<Self, MissingUnreleased>
This changelog with the entry for version above its Unreleased
content.
§Errors
Returns an error when the changelog has no Unreleased heading.
Sourcepub(crate) fn contribute(
&self,
edits: &mut PlannedEdits,
) -> Result<(), EditError>
pub(crate) fn contribute( &self, edits: &mut PlannedEdits, ) -> Result<(), EditError>
Trait Implementations§
Source§impl Clone for ChangelogEdit
impl Clone for ChangelogEdit
Source§fn clone(&self) -> ChangelogEdit
fn clone(&self) -> ChangelogEdit
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChangelogEdit
impl Debug for ChangelogEdit
impl Eq for ChangelogEdit
Source§impl PartialEq for ChangelogEdit
impl PartialEq for ChangelogEdit
impl StructuralPartialEq for ChangelogEdit
Auto Trait Implementations§
impl Freeze for ChangelogEdit
impl RefUnwindSafe for ChangelogEdit
impl Send for ChangelogEdit
impl Sync for ChangelogEdit
impl Unpin for ChangelogEdit
impl UnsafeUnpin for ChangelogEdit
impl UnwindSafe for ChangelogEdit
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.