[][src]Struct ra_ap_ide::NavigationTarget

pub struct NavigationTarget {
    pub file_id: FileId,
    pub full_range: TextRange,
    pub focus_range: Option<TextRange>,
    pub name: SmolStr,
    pub kind: SyntaxKind,
    pub container_name: Option<SmolStr>,
    pub description: Option<String>,
    pub docs: Option<String>,
}

NavigationTarget represents and element in the editor's UI which you can click on to navigate to a particular piece of code.

Typically, a NavigationTarget corresponds to some element in the source code, like a function or a struct, but this is not strictly required.

Fields

file_id: FileIdfull_range: TextRange

Range which encompasses the whole element.

Should include body, doc comments, attributes, etc.

Clients should use this range to answer "is the cursor inside the element?" question.

focus_range: Option<TextRange>

A "most interesting" range withing the full_range.

Typically, full_range is the whole syntax node, including doc comments, and focus_range is the range of the identifier. "Most interesting" range within the full range, typically the range of identifier.

Clients should place the cursor on this range when navigating to this target.

name: SmolStrkind: SyntaxKindcontainer_name: Option<SmolStr>description: Option<String>docs: Option<String>

Implementations

impl NavigationTarget[src]

pub fn focus_or_full_range(&self) -> TextRange[src]

Trait Implementations

impl Clone for NavigationTarget[src]

impl Debug for NavigationTarget[src]

impl Eq for NavigationTarget[src]

impl Hash for NavigationTarget[src]

impl PartialEq<NavigationTarget> for NavigationTarget[src]

impl StructuralEq for NavigationTarget[src]

impl StructuralPartialEq for NavigationTarget[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Cast for T

impl<T> CloneAny for T where
    T: Clone + Any

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.