Skip to main content

Concept

Struct Concept 

Source
pub struct Concept<'a> {
    pub explanation: &'a Explanation,
    pub frontmatter: Frontmatter,
    pub body: Option<String>,
    pub member: Option<String>,
}
Expand description

A concept ready to be written: its node, its frontmatter, and its prose.

Fields§

§explanation: &'a Explanation

The graph node and its neighbourhood.

§frontmatter: Frontmatter

The frontmatter to render.

§body: Option<String>

The node’s prose body, when it has one.

§member: Option<String>

The workspace member this concept came from, for a bundle spanning several repositories (ADR-0009). None for a single project.

Nesting by member is what stops two repositories’ file:README.md landing on one path. The vault this replaces solved the same problem by qualifying the key and hashing the filename, because it had one flat directory to work with; a bundle has directories, so the structure carries it.

Auto Trait Implementations§

§

impl<'a> Freeze for Concept<'a>

§

impl<'a> RefUnwindSafe for Concept<'a>

§

impl<'a> Send for Concept<'a>

§

impl<'a> Sync for Concept<'a>

§

impl<'a> Unpin for Concept<'a>

§

impl<'a> UnsafeUnpin for Concept<'a>

§

impl<'a> UnwindSafe for Concept<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.