pub struct Frontmatter { /* private fields */ }Expand description
Parsed markdown frontmatter and body.
Implementations§
Source§impl Frontmatter
impl Frontmatter
Sourcepub fn parse(content: &str) -> Result<Self, FrontmatterError>
pub fn parse(content: &str) -> Result<Self, FrontmatterError>
Parse a markdown document into frontmatter + body.
Sourcepub fn skills(&self) -> Vec<String>
pub fn skills(&self) -> Vec<String>
Read all referenced skills as a flat list (load followed by available).
Sourcepub fn skills_structured(&self) -> SkillsSpec
pub fn skills_structured(&self) -> SkillsSpec
Read skills in structured load/available form.
Sourcepub fn set_body(&mut self, body: String)
pub fn set_body(&mut self, body: String)
Replace the Markdown body while preserving the parsed frontmatter.
Sourcepub fn has_frontmatter(&self) -> bool
pub fn has_frontmatter(&self) -> bool
Whether this document contains frontmatter delimiters.
Trait Implementations§
Source§impl Clone for Frontmatter
impl Clone for Frontmatter
Auto Trait Implementations§
impl Forget for Frontmatter
impl Freeze for Frontmatter
impl RefUnwindSafe for Frontmatter
impl Send for Frontmatter
impl Sync for Frontmatter
impl Unpin for Frontmatter
impl UnsafeUnpin for Frontmatter
impl UnwindSafe for Frontmatter
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