pub struct SemanticToken {
pub span: Span,
pub token_type: SemanticTokenType,
pub modifiers: Vec<SemanticModifier>,
}Expand description
A semantic token for IDE highlighting.
Fields§
§span: SpanThe source span of this token.
token_type: SemanticTokenTypeThe token type.
modifiers: Vec<SemanticModifier>Additional modifiers.
Implementations§
Source§impl SemanticToken
impl SemanticToken
Sourcepub fn new(span: Span, token_type: SemanticTokenType) -> Self
pub fn new(span: Span, token_type: SemanticTokenType) -> Self
Create a new semantic token without modifiers.
Sourcepub fn with_modifiers(
span: Span,
token_type: SemanticTokenType,
modifiers: Vec<SemanticModifier>,
) -> Self
pub fn with_modifiers( span: Span, token_type: SemanticTokenType, modifiers: Vec<SemanticModifier>, ) -> Self
Create a semantic token with modifiers.
Trait Implementations§
Source§impl Clone for SemanticToken
impl Clone for SemanticToken
Source§fn clone(&self) -> SemanticToken
fn clone(&self) -> SemanticToken
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SemanticToken
impl Debug for SemanticToken
Source§impl PartialEq for SemanticToken
impl PartialEq for SemanticToken
impl StructuralPartialEq for SemanticToken
Auto Trait Implementations§
impl Freeze for SemanticToken
impl RefUnwindSafe for SemanticToken
impl Send for SemanticToken
impl Sync for SemanticToken
impl Unpin for SemanticToken
impl UnsafeUnpin for SemanticToken
impl UnwindSafe for SemanticToken
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more