Skip to main content

SemanticTokensProvider

Trait SemanticTokensProvider 

Source
pub trait SemanticTokensProvider<L>
where L: Language,
{ // Required method fn semantic_tokens<S>( &self, root: &RedNode<'_, L>, source: &S, line_map: &LineMap, ) -> Vec<SemanticToken> where S: Source + ?Sized; }
Expand description

Trait for languages that support semantic highlighting.

Required Methods§

Source

fn semantic_tokens<S>( &self, root: &RedNode<'_, L>, source: &S, line_map: &LineMap, ) -> Vec<SemanticToken>
where S: Source + ?Sized,

Returns the semantic tokens for the given document.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§