Skip to main content

Parser

Trait Parser 

Source
pub trait Parser: Send + Sync {
    type Elem: Element;
    type Rel: Relationship;
    type Error: Error;

    // Required methods
    fn parse(
        &self,
        source: &str,
        path: &Path,
    ) -> Result<ParseResult<Self::Elem, Self::Rel>, Self::Error>;
    fn validate(&self, source: &str) -> Vec<Diagnostic>;
}

Required Associated Types§

Required Methods§

Source

fn parse( &self, source: &str, path: &Path, ) -> Result<ParseResult<Self::Elem, Self::Rel>, Self::Error>

Source

fn validate(&self, source: &str) -> Vec<Diagnostic>

Implementors§