Skip to main content

FormatParser

Trait FormatParser 

Source
pub trait FormatParser {
    // Required method
    fn parse_full(&self, input: &str) -> Vec<SpannedRegion>;

    // Provided method
    fn parse(&self, input: &str) -> Vec<Region> { ... }
}
Expand description

Trait for format-specific parsers that classify text into regions.

Required Methods§

Source

fn parse_full(&self, input: &str) -> Vec<SpannedRegion>

Classify input and record source byte ranges where possible.

Provided Methods§

Source

fn parse(&self, input: &str) -> Vec<Region>

Classify input into regions, dropping recorded spans.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§