pub struct Parser<'a> { /* private fields */ }Expand description
Markdown parser.
Implementations§
Source§impl<'a> Parser<'a>
impl<'a> Parser<'a>
Sourcepub fn new(allocator: &'a Allocator, source: &'a str) -> Self
pub fn new(allocator: &'a Allocator, source: &'a str) -> Self
Creates a new parser with default options.
Sourcepub fn with_options(
allocator: &'a Allocator,
source: &'a str,
options: ParserOptions,
) -> Self
pub fn with_options( allocator: &'a Allocator, source: &'a str, options: ParserOptions, ) -> Self
Creates a new parser with the specified options.
Sourcepub fn parse(self) -> ParseResult<Document<'a>>
pub fn parse(self) -> ParseResult<Document<'a>>
Parses the source into a document AST.
Auto Trait Implementations§
impl<'a> Freeze for Parser<'a>
impl<'a> !RefUnwindSafe for Parser<'a>
impl<'a> !Send for Parser<'a>
impl<'a> !Sync for Parser<'a>
impl<'a> Unpin for Parser<'a>
impl<'a> UnsafeUnpin for Parser<'a>
impl<'a> !UnwindSafe for Parser<'a>
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