pub trait Parser<T = SourceFile> {
type Error: Error;
// Required method
fn parse_cells(&mut self, cells: CellStream) -> Result<T, Self::Error>;
}Expand description
A parser backend that produces one typed syntax target.
Backends may construct T directly or adapt their concrete syntax tree
through ExternalCstNode and migrate.
Required Associated Types§
Required Methods§
Sourcefn parse_cells(&mut self, cells: CellStream) -> Result<T, Self::Error>
fn parse_cells(&mut self, cells: CellStream) -> Result<T, Self::Error>
Parses cells into one typed syntax target.
§Errors
Returns the backend’s Self::Error when it cannot produce T.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".