pub struct SemanticToken {
pub start: u32,
pub length: u32,
pub token_type: SemanticTokenType,
pub modifiers: u32,
}Expand description
A single semantic token with position and type information.
Fields§
§start: u32Start offset in the source (byte offset)
length: u32Length of the token in bytes
token_type: SemanticTokenTypeThe semantic token type
modifiers: u32Bitfield of modifiers
Implementations§
Source§impl SemanticToken
impl SemanticToken
Sourcepub fn new(start: u32, length: u32, token_type: SemanticTokenType) -> Self
pub fn new(start: u32, length: u32, token_type: SemanticTokenType) -> Self
Creates a new semantic token.
Sourcepub fn with_modifiers(
start: u32,
length: u32,
token_type: SemanticTokenType,
modifiers: u32,
) -> Self
pub fn with_modifiers( start: u32, length: u32, token_type: SemanticTokenType, modifiers: u32, ) -> Self
Creates a new 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 (const: unstable) · 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
impl Eq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.