Skip to main content

LanguageSupport

Trait LanguageSupport 

Source
pub trait LanguageSupport: Send + Sync {
    // Required methods
    fn language_name(&self) -> &str;
    fn language_id(&self) -> &str;
    fn parse(
        &self,
        text: &str,
        offset_encoding: OffsetEncoding,
    ) -> Result<Vec<TokenInfo>, ParseError>;
}

Required Methods§

Source

fn language_name(&self) -> &str

Source

fn language_id(&self) -> &str

Source

fn parse( &self, text: &str, offset_encoding: OffsetEncoding, ) -> Result<Vec<TokenInfo>, ParseError>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§