pub struct Section {
pub slug: String,
pub title: String,
pub text: String,
}Expand description
One ## section of an ADR body.
Fields§
§slug: StringURL-safe slug derived from the heading.
title: StringHeading text.
text: StringThe section’s body: everything between this ## heading and the next
one, verbatim and uncapped, with surrounding blank lines trimmed.
The heading line itself is excluded — a section’s note is already titled
by it, and a ### subheading inside the span is body text and stays.
AdrDoc::facts caps this before it reaches the store; the vault renders
it whole. Empty when a heading is immediately followed by another.
Populated by parse_adr only. [crate::blueprint] and [crate::site]
share this struct and leave it empty — their section notes have the same
defect #545 fixes here, and fixing them is the same shape of change on a
different document class.
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 UnsafeUnpin 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.