Skip to main content

LspQueryRecord

Enum LspQueryRecord 

Source
pub enum LspQueryRecord<'a> {
    Location {
        flags: u8,
        hash: LspHash,
        line: u32,
        col: u32,
        end_line: u32,
        end_col: u32,
        path: &'a str,
    },
    Markup {
        format: u8,
        text: &'a str,
    },
    Symbol {
        sym_kind: u8,
        flags: u8,
        depth: u8,
        line: u32,
        col: u32,
        end_line: u32,
        end_col: u32,
        name: &'a str,
        path: &'a str,
    },
    Edit {
        flags: u8,
        hash: LspHash,
        line: u32,
        col: u32,
        end_line: u32,
        end_col: u32,
        new_text: &'a str,
        path: &'a str,
    },
    Completion {
        item_kind: u8,
        flags: u8,
        line: u32,
        col: u32,
        end_line: u32,
        end_col: u32,
        label: &'a str,
        insert: &'a str,
        detail: &'a str,
    },
    Signature {
        flags: u8,
        active_param: u16,
        param_start: u16,
        param_end: u16,
        label: &'a str,
        doc: &'a str,
    },
}
Expand description

One decoded record from an LSP_QUERY response payload.

Variants§

§

Location

LOCATION 0x01: [kind:1][flags:1][hash:16][line:4][col:4][end_line:4][end_col:4][path_len:2][path:N]

Fields

§flags: u8
§hash: LspHash

Content version the location refers into; zero when unknown.

§line: u32
§col: u32
§end_line: u32
§end_col: u32
§path: &'a str
§

Markup

MARKUP 0x02: [kind:1][format:1][text_len:4][text:N]

Fields

§text: &'a str
§

Symbol

SYMBOL 0x03: [kind:1][sym_kind:1][flags:1][depth:1][line:4][col:4] [end_line:4][end_col:4][name_len:2][name:N][path_len:2][path:N] depth nests document outlines (pre-order); 0 at the top level.

Fields

§sym_kind: u8

LSP SymbolKind value.

§depth: u8
§line: u32
§col: u32
§end_line: u32
§end_col: u32
§name: &'a str
§path: &'a str
§

Edit

EDIT 0x04: [kind:1][flags:1][hash:16][line:4][col:4][end_line:4][end_col:4] [new_len:4][new_text:N][path_len:2][path:N] One ordered edit of a rename plan, against the content version named by hash. Data, never applied.

Fields

§flags: u8
§hash: LspHash
§line: u32
§col: u32
§end_line: u32
§end_col: u32
§new_text: &'a str
§path: &'a str
§

Completion

COMPLETION 0x05: [kind:1][item_kind:1][flags:1][line:4][col:4] [end_line:4][end_col:4][label_len:2][label:N][insert_len:2][insert:N] [detail_len:2][detail:N] The range is the item’s primary replace range (zero range → the client picks its own word boundary); empty insert → insert the label.

Fields

§item_kind: u8

LSP CompletionItemKind value; 0 unknown.

§flags: u8

LSP_COMPLETION_* bits.

§line: u32
§col: u32
§end_line: u32
§end_col: u32
§label: &'a str
§insert: &'a str
§detail: &'a str
§

Signature

SIGNATURE 0x06: [kind:1][flags:1][active_param:2][param_start:2] [param_end:2][label_len:2][label:N][doc_len:4][doc:N] One signature, the active one first (LSP_SIGNATURE_ACTIVE); param_start/param_end bound the active parameter within label in UTF-8 bytes (0,0 = unknown).

Fields

§flags: u8

LSP_SIGNATURE_* bits.

§active_param: u16

Active parameter index, or LSP_SIGNATURE_NO_PARAM.

§param_start: u16
§param_end: u16
§label: &'a str
§doc: &'a str

Trait Implementations§

Source§

impl<'a> Clone for LspQueryRecord<'a>

Source§

fn clone(&self) -> LspQueryRecord<'a>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for LspQueryRecord<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Eq for LspQueryRecord<'a>

Source§

impl<'a> PartialEq for LspQueryRecord<'a>

Source§

fn eq(&self, other: &LspQueryRecord<'a>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<'a> StructuralPartialEq for LspQueryRecord<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for LspQueryRecord<'a>

§

impl<'a> RefUnwindSafe for LspQueryRecord<'a>

§

impl<'a> Send for LspQueryRecord<'a>

§

impl<'a> Sync for LspQueryRecord<'a>

§

impl<'a> Unpin for LspQueryRecord<'a>

§

impl<'a> UnsafeUnpin for LspQueryRecord<'a>

§

impl<'a> UnwindSafe for LspQueryRecord<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.