pub struct Adr {Show 13 fields
pub number: u32,
pub title: String,
pub date: Date,
pub status: AdrStatus,
pub links: Vec<AdrLink>,
pub decision_makers: Vec<String>,
pub consulted: Vec<String>,
pub informed: Vec<String>,
pub tags: Vec<String>,
pub context: String,
pub decision: String,
pub consequences: String,
pub path: Option<PathBuf>,
}Expand description
An Architecture Decision Record.
Fields§
§number: u32The ADR number (e.g., 1, 2, 3).
title: StringThe title of the decision.
date: DateThe date the decision was made.
status: AdrStatusThe current status of the decision.
links: Vec<AdrLink>Links to other ADRs.
decision_makers: Vec<String>People who made the decision (MADR 4.0.0).
consulted: Vec<String>People consulted for input (MADR 4.0.0). Two-way communication - their opinions are sought.
informed: Vec<String>People kept informed (MADR 4.0.0). One-way communication - they are kept up-to-date.
Tags for categorization.
context: StringThe context section (why this decision was needed).
decision: StringThe decision section (what was decided).
consequences: StringThe consequences section (what happens as a result).
path: Option<PathBuf>Path to the ADR file (not serialized to frontmatter).
Implementations§
Source§impl Adr
impl Adr
Sourcepub fn new(number: u32, title: impl Into<String>) -> Self
pub fn new(number: u32, title: impl Into<String>) -> Self
Create a new ADR with the given number and title.
Sourcepub fn full_title(&self) -> String
pub fn full_title(&self) -> String
Returns the full title with number prefix (e.g., “1. Use Rust”).
Sourcepub fn set_status(&mut self, status: AdrStatus)
pub fn set_status(&mut self, status: AdrStatus)
Set the status and optionally record what this supersedes.
Sourcepub fn set_decision_makers(&mut self, makers: Vec<String>)
pub fn set_decision_makers(&mut self, makers: Vec<String>)
Set the decision makers (MADR 4.0.0).
Sourcepub fn add_decision_maker(&mut self, maker: impl Into<String>)
pub fn add_decision_maker(&mut self, maker: impl Into<String>)
Add a decision maker (MADR 4.0.0).
Sourcepub fn set_consulted(&mut self, consulted: Vec<String>)
pub fn set_consulted(&mut self, consulted: Vec<String>)
Set the consulted people (MADR 4.0.0).
Sourcepub fn add_consulted(&mut self, person: impl Into<String>)
pub fn add_consulted(&mut self, person: impl Into<String>)
Add a consulted person (MADR 4.0.0).
Sourcepub fn set_informed(&mut self, informed: Vec<String>)
pub fn set_informed(&mut self, informed: Vec<String>)
Set the informed people (MADR 4.0.0).
Sourcepub fn add_informed(&mut self, person: impl Into<String>)
pub fn add_informed(&mut self, person: impl Into<String>)
Add an informed person (MADR 4.0.0).
Set the tags for categorization.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Adr
impl<'de> Deserialize<'de> for Adr
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>,
impl Eq for Adr
impl StructuralPartialEq for Adr
Auto Trait Implementations§
impl Freeze for Adr
impl RefUnwindSafe for Adr
impl Send for Adr
impl Sync for Adr
impl Unpin for Adr
impl UnwindSafe for Adr
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
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§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
key and return true if they are equal.