pub struct HeadingInfo {
pub level: u8,
pub style: HeadingStyle,
pub marker: String,
pub marker_column: usize,
pub content_column: usize,
pub text: String,
pub custom_id: Option<String>,
pub raw_text: String,
pub has_closing_sequence: bool,
pub closing_sequence: String,
pub is_valid: bool,
}Expand description
Information about a heading
Fields§
§level: u8Heading level (1-6 for ATX, 1-2 for Setext)
style: HeadingStyleStyle of heading
marker: StringThe heading marker (# characters or underline)
marker_column: usizeColumn where the marker starts (0-based)
content_column: usizeColumn where heading text starts
text: StringThe heading text (without markers and without custom ID syntax)
custom_id: Option<String>Custom header ID if present (e.g., from {#custom-id} syntax)
raw_text: StringOriginal heading text including custom ID syntax
has_closing_sequence: boolWhether it has a closing sequence (for ATX)
closing_sequence: StringThe closing sequence if present
is_valid: boolWhether this is a valid CommonMark heading (ATX headings require space after #)
False for malformed headings like #NoSpace that MD018 should flag
Trait Implementations§
Source§impl Clone for HeadingInfo
impl Clone for HeadingInfo
Source§fn clone(&self) -> HeadingInfo
fn clone(&self) -> HeadingInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for HeadingInfo
impl RefUnwindSafe for HeadingInfo
impl Send for HeadingInfo
impl Sync for HeadingInfo
impl Unpin for HeadingInfo
impl UnwindSafe for HeadingInfo
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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