#[non_exhaustive]pub struct Release {
pub version: Option<String>,
pub date: Option<String>,
pub date_span: Option<Span>,
pub yanked: bool,
pub heading: String,
pub link: Option<String>,
pub sections: Vec<Section>,
pub span: Span,
pub attributes: BTreeMap<String, String>,
pub links: Vec<LinkDefinition>,
}Expand description
A release identifier is opaque: neither SemVer nor chronological sorting is imposed.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.version: Option<String>Opaque identifier; None represents pending or unversioned content.
date: Option<String>Optional calendar date. Use validation to check calendar correctness. Timestamp-based formats retain the original timestamp in attributes.
date_span: Option<Span>Source location of a date stored outside the release heading, if known.
yanked: boolWhether the source explicitly marks this release as withdrawn.
heading: StringOriginal heading text, or decoded release title from a structured export.
link: Option<String>Resolved link on the release heading, if present.
sections: Vec<Section>Ordered groups, including unnamed groups for uncategorized content.
span: SpanSource location of the release heading.
attributes: BTreeMap<String, String>Format-specific attributes such as package, bump, author, or timestamp. Empty for ordinary Keep a Changelog releases.
links: Vec<LinkDefinition>References local to an independently decoded body, overriding document links. Empty for formats whose releases share one Markdown document.
Implementations§
Source§impl Release
impl Release
Sourcepub fn new(version: Option<String>) -> Self
pub fn new(version: Option<String>) -> Self
Create a release with no date, content, attributes, or source location. A missing identifier starts as pending; attributes can refine its state.
Sourcepub fn status(&self) -> ReleaseStatus
pub fn status(&self) -> ReleaseStatus
Classify this release using its current identifier and format attributes.
use logloom::{Release, ReleaseStatus};
let mut release = Release::new(Some("v1".into()));
assert_eq!(release.status(), ReleaseStatus::Published);
release.attributes.insert("draft".into(), "true".into());
assert_eq!(release.status(), ReleaseStatus::Draft);Sourcepub fn is_published(&self) -> bool
pub fn is_published(&self) -> bool
Whether published selectors should include this release or date/author record.
Sourcepub fn is_pending(&self) -> bool
pub fn is_pending(&self) -> bool
Whether this release is pending, including explicitly marked drafts.
Sourcepub fn is_prerelease(&self) -> bool
pub fn is_prerelease(&self) -> bool
Whether the input explicitly marks this as a prerelease.