pub struct Doc {
pub rel_path: String,
pub slug: String,
pub title: String,
pub description: Option<String>,
pub body_html: String,
pub has_math: bool,
pub has_mermaid: bool,
pub components_used: BTreeSet<String>,
pub headings: Vec<Heading>,
}Expand description
A fully processed document ready to render.
Fields§
§rel_path: StringPath relative to docs root, e.g. guide/intro.md.
slug: StringURL slug without extension, e.g. guide/intro.
title: StringResolved page title.
description: Option<String>Frontmatter description:, if any. Feeds the home dashboard subtitle and
the “Recent” list. None when the doc has no description:.
body_html: StringRendered body HTML.
has_math: boolWhether this doc contains math (drives the conditional KaTeX <head> link).
has_mermaid: boolWhether this doc contains a mermaid diagram (drives the lazy island load).
components_used: BTreeSet<String>Names of custom components rendered on this page (drives per-page island load).
headings: Vec<Heading>The h2/h3 outline of this page, in document order, for the right-rail
“On this page” table of contents. Ids match the id attributes stamped
onto the rendered heading tags in body_html.
Trait Implementations§
impl StructuralPartialEq for Doc
Auto Trait Implementations§
impl Freeze for Doc
impl RefUnwindSafe for Doc
impl Send for Doc
impl Sync for Doc
impl Unpin for Doc
impl UnsafeUnpin for Doc
impl UnwindSafe for Doc
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more