Skip to main content

Parser

Trait Parser 

Source
pub trait Parser: Send + Sync {
    // Required method
    fn parse_with_hint(
        &self,
        file: &File,
        content: &str,
        build_hint: Option<&str>,
    ) -> ParsedFile;

    // Provided method
    fn parse(&self, file: &File, content: &str) -> ParsedFile { ... }
}

Required Methods§

Source

fn parse_with_hint( &self, file: &File, content: &str, build_hint: Option<&str>, ) -> ParsedFile

Provided Methods§

Source

fn parse(&self, file: &File, content: &str) -> ParsedFile

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§