pub trait Parser: Send + Sync {
// Required methods
fn output(&self) -> TreeKind;
fn parse<'a>(
&self,
input: &'a str,
file: &mut File,
alloc: &'a Allocator,
) -> Result<Tree<'a>, Error>;
// Provided method
fn source<'a>(&self, input: &'a str) -> &'a str { ... }
}Expand description
Turns input text into a tree.
Required Methods§
fn output(&self) -> TreeKind
fn parse<'a>( &self, input: &'a str, file: &mut File, alloc: &'a Allocator, ) -> Result<Tree<'a>, Error>
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".