pub struct FencedCodeBlockParser {}Expand description
BlockParser for fenced code blocks.
Implementations§
Source§impl FencedCodeBlockParser
impl FencedCodeBlockParser
Sourcepub fn new() -> Self
pub fn new() -> Self
Returns a new FencedCodeBlockParser.
Trait Implementations§
Source§impl BlockParser for FencedCodeBlockParser
impl BlockParser for FencedCodeBlockParser
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_interrupt_paragraph(&self) -> bool
fn can_interrupt_paragraph(&self) -> bool
Returns true if the parser can interrupt paragraphs,
otherwise false.
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§impl Debug for FencedCodeBlockParser
impl Debug for FencedCodeBlockParser
Source§impl Default for FencedCodeBlockParser
impl Default for FencedCodeBlockParser
Source§fn default() -> FencedCodeBlockParser
fn default() -> FencedCodeBlockParser
Returns the “default value” for a type. Read more
Source§impl From<FencedCodeBlockParser> for AnyBlockParser
impl From<FencedCodeBlockParser> for AnyBlockParser
Source§fn from(p: FencedCodeBlockParser) -> Self
fn from(p: FencedCodeBlockParser) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FencedCodeBlockParser
impl RefUnwindSafe for FencedCodeBlockParser
impl Send for FencedCodeBlockParser
impl Sync for FencedCodeBlockParser
impl Unpin for FencedCodeBlockParser
impl UnsafeUnpin for FencedCodeBlockParser
impl UnwindSafe for FencedCodeBlockParser
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