pub struct Frontmatter {Show 13 fields
pub title: String,
pub description: String,
pub doc_type: String,
pub category: String,
pub tags: Vec<String>,
pub status: Status,
pub created: Option<Date>,
pub updated: Option<Date>,
pub author: String,
pub project: String,
pub technologies: Vec<String>,
pub audience: Vec<String>,
pub related: Vec<String>,
}Expand description
Parsed YAML frontmatter from an ADR file following the structured-madr schema.
Fields§
§title: StringShort descriptive title (1-100 chars).
description: StringOne-sentence summary (1-300 chars).
doc_type: StringDocument type identifier (const: “adr”).
category: StringDecision category (e.g., architecture, api, security).
Keywords for categorization (kebab-case).
status: StatusCurrent status in the lifecycle.
created: Option<Date>ISO 8601 date created.
updated: Option<Date>ISO 8601 date last modified.
Author or team responsible.
project: StringProject this decision applies to.
technologies: Vec<String>Technologies affected by decision.
audience: Vec<String>Intended readers.
Filenames of related ADRs.
Implementations§
Source§impl Frontmatter
impl Frontmatter
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Sets the description.
Sourcepub const fn with_status(self, status: Status) -> Self
pub const fn with_status(self, status: Status) -> Self
Sets the status.
Sourcepub fn with_category(self, category: impl Into<String>) -> Self
pub fn with_category(self, category: impl Into<String>) -> Self
Sets the category.
Sets the author.
Sourcepub fn with_project(self, project: impl Into<String>) -> Self
pub fn with_project(self, project: impl Into<String>) -> Self
Sets the project.
Sourcepub const fn with_created(self, date: Date) -> Self
pub const fn with_created(self, date: Date) -> Self
Sets the created date.
Sourcepub const fn with_updated(self, date: Date) -> Self
pub const fn with_updated(self, date: Date) -> Self
Sets the updated date.
Adds tags.
Sourcepub fn with_technologies(self, technologies: Vec<String>) -> Self
pub fn with_technologies(self, technologies: Vec<String>) -> Self
Adds technologies.
Adds related ADRs.
Trait Implementations§
Source§impl Clone for Frontmatter
impl Clone for Frontmatter
Source§fn clone(&self) -> Frontmatter
fn clone(&self) -> Frontmatter
Returns a duplicate of the value. Read more
1.0.0 · 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 Frontmatter
impl Debug for Frontmatter
Source§impl Default for Frontmatter
impl Default for Frontmatter
Source§impl<'de> Deserialize<'de> for Frontmatter
impl<'de> Deserialize<'de> for Frontmatter
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Frontmatter
impl RefUnwindSafe for Frontmatter
impl Send for Frontmatter
impl Sync for Frontmatter
impl Unpin for Frontmatter
impl UnwindSafe for Frontmatter
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