#[non_exhaustive]pub struct LineToken {
pub line: u32,
pub start_char: u32,
pub length: u32,
pub token_type: u32,
pub modifiers: u32,
}Expand description
A semantic token as the LSP wire format wants it: zero-based line / UTF-16 char position with a
UTF-16 length, plus the legend indices. These are absolute (not yet delta-encoded); call
delta_encode for the on-wire (deltaLine, deltaStartChar, …) form. #[non_exhaustive] so
fields can be added without breaking downstream matches.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.line: u32Zero-based line of the token’s start.
start_char: u32Zero-based UTF-16 column of the token’s start.
length: u32Length in UTF-16 code units (the LSP unit).
token_type: u32Legend index of the token type (see SemanticTokenType::index).
modifiers: u32The token’s modifier bitset (see SemanticTokenModifiers::bits).
Trait Implementations§
impl Copy for LineToken
impl Eq for LineToken
impl StructuralPartialEq for LineToken
Auto Trait Implementations§
impl Freeze for LineToken
impl RefUnwindSafe for LineToken
impl Send for LineToken
impl Sync for LineToken
impl Unpin for LineToken
impl UnsafeUnpin for LineToken
impl UnwindSafe for LineToken
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