Struct lsp_types::InlayHint

source ·
pub struct InlayHint {
    pub position: Position,
    pub label: InlayHintLabel,
    pub kind: Option<InlayHintKind>,
    pub text_edits: Option<Vec<TextEdit>>,
    pub tooltip: Option<InlayHintTooltip>,
    pub padding_left: Option<bool>,
    pub padding_right: Option<bool>,
    pub data: Option<LSPAny>,
}
Expand description

Inlay hint information.

@since 3.17.0

Fields§

§position: Position

The position of this hint.

§label: InlayHintLabel

The label of this hint. A human readable string or an array of InlayHintLabelPart label parts.

Note that neither the string nor the label part can be empty.

§kind: Option<InlayHintKind>

The kind of this hint. Can be omitted in which case the client should fall back to a reasonable default.

§text_edits: Option<Vec<TextEdit>>

Optional text edits that are performed when accepting this inlay hint.

Note that edits are expected to change the document so that the inlay hint (or its nearest variant) is now part of the document and the inlay hint itself is now obsolete.

Depending on the client capability inlayHint.resolveSupport clients might resolve this property late using the resolve request.

§tooltip: Option<InlayHintTooltip>

The tooltip text when you hover over this item.

Depending on the client capability inlayHint.resolveSupport clients might resolve this property late using the resolve request.

§padding_left: Option<bool>

Render padding before the hint.

Note: Padding should use the editor’s background color, not the background color of the hint itself. That means padding can be used to visually align/separate an inlay hint.

§padding_right: Option<bool>

Render padding after the hint.

Note: Padding should use the editor’s background color, not the background color of the hint itself. That means padding can be used to visually align/separate an inlay hint.

§data: Option<LSPAny>

A data entry field that is preserved on a inlay hint between a textDocument/inlayHint and a inlayHint/resolve request.

Trait Implementations§

source§

impl Clone for InlayHint

source§

fn clone(&self) -> InlayHint

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for InlayHint

source§

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

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

impl<'de> Deserialize<'de> for InlayHint

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for InlayHint

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
__S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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 Twhere
T: Clone,

§

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 Twhere
U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,