Struct NodeHeading

pub struct NodeHeading { pub level: u8, pub setext: bool, pub closed: bool }

The metadata of a heading.

Fields

level: u8

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

setext: bool

Whether the heading is setext (if not, ATX).

closed: bool

Whether this ATX heading had a closing sequence of trailing hashes. Only meaningful for ATX headings (i.e. when setext is false).

Trait Implementations

impl Clone for NodeHeading

fn clone(&self) -> NodeHeading

impl Copy for NodeHeading

impl Debug for NodeHeading

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

impl Default for NodeHeading

fn default() -> NodeHeading

impl Eq for NodeHeading

impl PartialEq for NodeHeading

fn eq(&self, other: &NodeHeading) -> bool

impl StructuralPartialEq for NodeHeading

Auto Trait Implementations

impl Freeze for NodeHeading

impl RefUnwindSafe for NodeHeading

impl Send for NodeHeading

impl Sync for NodeHeading

impl Unpin for NodeHeading

impl UnsafeUnpin for NodeHeading

impl UnwindSafe for NodeHeading

Blanket Implementations

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

fn borrow_mut(&mut self) -> &mut T

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

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for NodeHeading

fn from(t: T) -> T

Returns the argument unchanged.

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

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

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

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

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

type Error = never;
fn try_from(value: U) -> Result<T, never>

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

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>