pub struct Heading {
pub level: u8,
pub text: String,
pub id: String,
}Expand description
A single heading discovered in a Markdown document.
Returned by collect_headings and by
crate::process_markdown_with_toc.
Fields§
§level: u8Heading level (1-6 for ATX, 1-2 for setext).
text: StringPlain-text content of the heading (markup stripped).
id: StringThe anchor id that comrak emits for this heading. Computed
with [comrak::Anchorizer] so it matches the id="…" value
produced when MarkdownOptions::header_ids is set.
Trait Implementations§
impl Eq for Heading
impl StructuralPartialEq for Heading
Auto Trait Implementations§
impl Freeze for Heading
impl RefUnwindSafe for Heading
impl Send for Heading
impl Sync for Heading
impl Unpin for Heading
impl UnsafeUnpin for Heading
impl UnwindSafe for Heading
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