pub struct Heading {
pub meta: NodeMeta,
pub depth: u8,
pub kind: HeadingKind,
pub children: Vec<Inline>,
/* private fields */
}Expand description
A heading. Source: # Title (ATX) or Title\n=== (setext).
Fields§
§meta: NodeMetaNode metadata (source span).
depth: u8Heading level, 1..=6.
kind: HeadingKindWhether the heading used ATX or setext syntax.
children: Vec<Inline>The heading’s inline content.
Implementations§
Source§impl Heading
impl Heading
Sourcepub fn with_source(
depth: u8,
kind: HeadingKind,
text: &str,
definitions: &Definitions,
) -> (Self, Vec<Diagnostic>)
pub fn with_source( depth: u8, kind: HeadingKind, text: &str, definitions: &Definitions, ) -> (Self, Vec<Diagnostic>)
A heading of the given depth and kind whose content is text, built
as Paragraph::with_source builds a paragraph.
Sourcepub fn source(&self) -> Option<&str>
pub fn source(&self) -> Option<&str>
The text Heading::with_source built the heading from.
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