pub struct SemanticToken {
pub range: TextRange,
pub token_type: SemanticTokenType,
pub modifiers: u32,
}Expand description
A semantic-highlighting token: a source range classified by its contextual/resolved role. Drives
textDocument/semanticTokens — intelligence a grammar can’t produce. Modifiers are a bitset of
semantic_token_modifier flags.
Fields§
§range: TextRangeThe token’s byte range.
token_type: SemanticTokenTypeWhat the token denotes.
modifiers: u32A bitset of semantic_token_modifier flags.
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SemanticToken
Source§impl Debug for SemanticToken
impl Debug for SemanticToken
Source§impl<'de> Deserialize<'de> for SemanticToken
impl<'de> Deserialize<'de> for SemanticToken
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SemanticToken
Source§impl PartialEq for SemanticToken
impl PartialEq for SemanticToken
Source§fn eq(&self, other: &SemanticToken) -> bool
fn eq(&self, other: &SemanticToken) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SemanticToken
impl Serialize 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