pub struct InlayHint {
pub position: Position,
pub label: String,
pub kind: InlayHintKind,
pub has_tooltip: bool,
}Expand description
An inlay hint from rust-analyzer
Fields§
§position: PositionPosition where the hint should be displayed
label: StringThe hint label (type name, parameter name, etc.)
kind: InlayHintKindKind of hint
has_tooltip: boolWhether this hint can be resolved for more details
Implementations§
Source§impl InlayHint
impl InlayHint
Sourcepub fn type_hint(position: Position, type_name: impl Into<String>) -> Self
pub fn type_hint(position: Position, type_name: impl Into<String>) -> Self
Create a new type hint
Sourcepub fn parameter_hint(position: Position, param_name: impl Into<String>) -> Self
pub fn parameter_hint(position: Position, param_name: impl Into<String>) -> Self
Create a new parameter hint
Sourcepub fn is_type_hint(&self) -> bool
pub fn is_type_hint(&self) -> bool
Check if this is a type hint
Sourcepub fn is_parameter_hint(&self) -> bool
pub fn is_parameter_hint(&self) -> bool
Check if this is a parameter hint
Sourcepub fn is_copy_type(&self) -> bool
pub fn is_copy_type(&self) -> bool
Check if the type is a known Copy type
Trait Implementations§
Source§impl<'de> Deserialize<'de> for InlayHint
impl<'de> Deserialize<'de> for InlayHint
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
Auto Trait Implementations§
impl Freeze for InlayHint
impl RefUnwindSafe for InlayHint
impl Send for InlayHint
impl Sync for InlayHint
impl Unpin for InlayHint
impl UnsafeUnpin for InlayHint
impl UnwindSafe for InlayHint
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