Struct HeadingMeta

#[non_exhaustive]
pub struct HeadingMeta { pub level: u8, pub content: String, pub sourcepos: Option<Sourcepos> }

The struct passed to the HeadingAdapter for custom heading implementations.

Fields

level: u8

The level of the heading; from 1 to 6 for ATX headings, 1 or 2 for setext headings.

content: String

The content of the heading as a "flattened" string—flattened in the sense that any <strong> or other tags are removed. In the Markdown heading ## This is **bold**, for example, the would be the string "This is bold".

sourcepos: Option<Sourcepos>

Source position information for the heading, if any.

Implementations

impl HeadingMeta

fn new(level: u8, content: impl Into<String>, sourcepos: Option<Sourcepos>) -> Self

Create a new HeadingMeta.

Trait Implementations

impl Clone for HeadingMeta

fn clone(&self) -> Self

impl Debug for HeadingMeta

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Auto Trait Implementations

impl Freeze for HeadingMeta

impl RefUnwindSafe for HeadingMeta

impl Send for HeadingMeta

impl Sync for HeadingMeta

impl Unpin for HeadingMeta

impl UnsafeUnpin for HeadingMeta

impl UnwindSafe for HeadingMeta

Blanket Implementations

impl<F, T, S> SimdInto<T, S> for HeadingMeta where T: SimdFrom<F, S>, S: Simd,

impl<T> Any for HeadingMeta where T: 'static + ?Sized,

impl<T> Borrow<T> for HeadingMeta where T: ?Sized,

impl<T> BorrowMut<T> for HeadingMeta where T: ?Sized,

impl<T> CloneToUninit for HeadingMeta where T: Clone,

impl<T> From<T> for HeadingMeta

impl<T> ToOwned for HeadingMeta where T: Clone,

impl<T, S> SimdFrom<T, S> for HeadingMeta where S: Simd,

impl<T, U> Into<U> for HeadingMeta where U: From<T>,

impl<T, U> TryFrom<U> for HeadingMeta where U: Into<T>,

impl<T, U> TryInto<U> for HeadingMeta where U: TryFrom<T>,