pub struct IndentedCodeBlockParser {}Expand description
BlockParser for indented code blocks.
Implementations§
Source§impl IndentedCodeBlockParser
impl IndentedCodeBlockParser
Sourcepub fn new() -> Self
pub fn new() -> Self
Returns a new IndentedCodeBlockParser.
Trait Implementations§
Source§impl BlockParser for IndentedCodeBlockParser
impl BlockParser for IndentedCodeBlockParser
Source§fn trigger(&self) -> &[u8] ⓘ
fn trigger(&self) -> &[u8] ⓘ
Returns a list of characters that triggers Parse method of
this parser.
If
trigger returns a empty slice, open will be called with any lines.Source§fn open(
&self,
arena: &mut Arena,
_parent_ref: NodeRef,
reader: &mut BasicReader<'_>,
_ctx: &mut Context,
) -> Option<(NodeRef, State)>
fn open( &self, arena: &mut Arena, _parent_ref: NodeRef, reader: &mut BasicReader<'_>, _ctx: &mut Context, ) -> Option<(NodeRef, State)>
Parses the current line and returns a result of parsing. Read more
Source§fn cont(
&self,
arena: &mut Arena,
node_ref: NodeRef,
reader: &mut BasicReader<'_>,
_ctx: &mut Context,
) -> Option<State>
fn cont( &self, arena: &mut Arena, node_ref: NodeRef, reader: &mut BasicReader<'_>, _ctx: &mut Context, ) -> Option<State>
Parses the current line and returns a result of parsing. Read more
Source§fn close(
&self,
arena: &mut Arena,
node_ref: NodeRef,
reader: &mut BasicReader<'_>,
_ctx: &mut Context,
)
fn close( &self, arena: &mut Arena, node_ref: NodeRef, reader: &mut BasicReader<'_>, _ctx: &mut Context, )
close will be called when the parser returns State::CLOSE.Source§fn can_accept_indented_line(&self) -> bool
fn can_accept_indented_line(&self) -> bool
Returns true if the parser can open new node when
the given line is being indented more than 3 spaces.
Source§fn can_interrupt_paragraph(&self) -> bool
fn can_interrupt_paragraph(&self) -> bool
Returns true if the parser can interrupt paragraphs,
otherwise false.
Source§impl Debug for IndentedCodeBlockParser
impl Debug for IndentedCodeBlockParser
Source§impl Default for IndentedCodeBlockParser
impl Default for IndentedCodeBlockParser
Source§fn default() -> IndentedCodeBlockParser
fn default() -> IndentedCodeBlockParser
Returns the “default value” for a type. Read more
Source§impl From<IndentedCodeBlockParser> for AnyBlockParser
impl From<IndentedCodeBlockParser> for AnyBlockParser
Source§fn from(p: IndentedCodeBlockParser) -> Self
fn from(p: IndentedCodeBlockParser) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for IndentedCodeBlockParser
impl RefUnwindSafe for IndentedCodeBlockParser
impl Send for IndentedCodeBlockParser
impl Sync for IndentedCodeBlockParser
impl Unpin for IndentedCodeBlockParser
impl UnsafeUnpin for IndentedCodeBlockParser
impl UnwindSafe for IndentedCodeBlockParser
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