pub struct BlockState<'a, 'b>where
    'b: 'a,
{ pub src: &'b str, pub md: &'a MarkdownIt, pub root_ext: &'b mut RootExtSet, pub node: Node, pub line_offsets: Vec<LineOffset>, pub blk_indent: usize, pub line: usize, pub line_max: usize, pub tight: bool, pub list_indent: Option<u32>, pub level: u32, }
Expand description

Sandbox object containing data required to parse block structures.

Fields

src: &'b str

Markdown source.

md: &'a MarkdownIt

Link to parser instance.

root_ext: &'b mut RootExtSetnode: Node

Current node, your rule is supposed to add children to it.

line_offsets: Vec<LineOffset>blk_indent: usize

Current block content indent (for example, if we are inside a list, it would be positioned after list marker).

line: usize

Current line in src.

line_max: usize

Maximum allowed line in src.

tight: bool

True if there are no empty lines between paragraphs, used to toggle loose/tight mode for lists.

list_indent: Option<u32>

indent of the current list block.

level: u32

Implementations

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.