pub enum Section {
Verbatim {
text: String,
generated: bool,
},
Release {
name: Version,
date: Option<Zoned>,
heading_level: usize,
version_prefix: String,
unknown: String,
removed_messages: Vec<ObjectId>,
segments: Vec<Segment>,
},
}Variants§
Verbatim
A part of a changelog which couldn’t be understood and is taken in verbatim. This is usually the pre-amble of the changelog or a custom footer.
Fields
Release
A segment describing a particular release
Implementations§
Source§impl Section
impl Section
pub const DEFAULT_PREFIX: &'static str = "v"
pub fn from_history_segment( package: &Package, segment: &Segment<'_>, repo: &Repository, selection: Selection, prev_segment: Option<&Segment<'_>>, ) -> Self
Source§impl Section
impl Section
pub const UNKNOWN_TAG_START: &'static str = "<csr-unknown>"
pub const UNKNOWN_TAG_END: &'static str = "<csr-unknown/>"
pub const READONLY_TAG: &'static str = "<csr-read-only-do-not-edit/>\n"
pub const NL: &'static str = "\n"
Source§impl Section
impl Section
Sourcepub fn is_essential(&self) -> bool
pub fn is_essential(&self) -> bool
Returns true if there are segments that would always be present as they carry essential information about the release.
Sourcepub fn is_probably_lacking_user_edits(&self) -> bool
pub fn is_probably_lacking_user_edits(&self) -> bool
Returns true if there is no user-made section, or no edit by users in conventional segments at all. Note that we can’t tell if existing messages were edited (because we don’t try hard enough).
Trait Implementations§
impl Eq for Section
impl StructuralPartialEq for Section
Auto Trait Implementations§
impl Freeze for Section
impl RefUnwindSafe for Section
impl Send for Section
impl Sync for Section
impl Unpin for Section
impl UnwindSafe for Section
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,
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
Compare self to
key and return true if they are equal.