pub struct Doc {Show 14 fields
pub id: DocId,
pub path: String,
pub dir: Option<String>,
pub tier: Tier,
pub slug: String,
pub frontmatter: Frontmatter,
pub title: Option<String>,
pub chapters: Vec<String>,
pub bundle_files: Vec<String>,
pub links: Vec<Located<String>>,
pub anchors: Vec<Located<String>>,
pub path_cites: Vec<Located<String>>,
pub body_lines: usize,
pub body_hash: String,
}Fields§
§id: DocId§path: StringThe main Markdown file, relative to the repository root.
dir: Option<String>The bundle directory of a directory-form document.
tier: Tier§slug: StringThe slug part of the file name.
frontmatter: Frontmatter§title: Option<String>§chapters: Vec<String>Chapter files inside the bundle.
bundle_files: Vec<String>Non-Markdown files inside the bundle, relative to the repository root.
links: Vec<Located<String>>§anchors: Vec<Located<String>>§path_cites: Vec<Located<String>>§body_lines: usize§body_hash: StringHash of the main file’s body, for sealed documents.
Implementations§
Source§impl Doc
impl Doc
Sourcepub fn slug_id(&self) -> Option<String>
pub fn slug_id(&self) -> Option<String>
plan:root/payment-rollout: the id with the slug in place of a timestamp key, the name
people write when they remember the title. None when the key is the slug already.
pub fn fm(&self) -> Option<&Map<String, Value>>
pub fn str_field(&self, key: &str) -> Option<String>
pub fn list_field(&self, key: &str) -> Vec<String>
pub fn status(&self) -> Option<String>
pub fn files(&self) -> Vec<FileEntry>
Trait Implementations§
Auto Trait Implementations§
impl Forget for Doc
impl Freeze for Docwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<String, Value>>: Freeze,
PhantomData<String>: Freeze,
PhantomData<Located<String>>: Freeze,
impl Move for Doc
impl RefUnwindSafe for Doc
impl Send for Doc
impl Sync for Doc
impl Unpin for Doc
impl UnsafeUnpin for Docwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, Value>>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<Located<String>>: UnsafeUnpin,
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