pub struct Log {
pub frontmatter: Frontmatter,
pub title: Option<String>,
pub days: Vec<LogDay>,
}Expand description
A parsed log.md.
Fields§
§frontmatter: FrontmatterOptional frontmatter block.
title: Option<String>The top-level # heading text, if any.
days: Vec<LogDay>Date-grouped entries, in document order (the convention is newest-first).
Implementations§
Source§impl Log
impl Log
Sourcepub fn to_markdown(&self) -> String
pub fn to_markdown(&self) -> String
Renders the log back to markdown.
Sourcepub fn invalid_dates(&self) -> Vec<&str>
pub fn invalid_dates(&self) -> Vec<&str>
Returns the date headings that are not valid ISO-8601 YYYY-MM-DD
(the spec requires this form).
Sourcepub fn structural_errors(&self, text: &str) -> Vec<String>
pub fn structural_errors(&self, text: &str) -> Vec<String>
Returns structural log violations found in the source text.
Log::parse intentionally remains a forgiving reader for consumers
that want to recover entries from imperfect Markdown. Conformance
validation uses this stricter pass to ensure that ignored content is
not mistaken for a valid log.
Trait Implementations§
impl StructuralPartialEq for Log
Auto Trait Implementations§
impl Freeze for Log
impl RefUnwindSafe for Log
impl Send for Log
impl Sync for Log
impl Unpin for Log
impl UnsafeUnpin for Log
impl UnwindSafe for Log
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