pub struct SymbolCandidate {
pub name: String,
pub kind: u32,
pub kind_name: String,
pub container: Option<String>,
pub line: u32,
pub character: u32,
}Expand description
One symbol a name resolved to, with enough context to tell it apart from its namesakes and to address it by position instead.
§Examples
use mcpls_core::error::SymbolCandidate;
let candidate = SymbolCandidate {
name: "new".to_string(),
kind: 6,
kind_name: "Method".to_string(),
container: Some("Config".to_string()),
line: 12,
character: 8,
};
assert_eq!(candidate.to_string(), "Method `new` in `Config` at 12:8");Fields§
§name: StringThe symbol’s name as the server reports it.
kind: u32Numeric LSP SymbolKind.
kind_name: StringReadable name of Self::kind.
container: Option<String>Enclosing symbol, when the server reports one.
line: u321-based line of the identifier.
character: u321-based character of the identifier.
Trait Implementations§
Source§impl Clone for SymbolCandidate
impl Clone for SymbolCandidate
Source§impl Debug for SymbolCandidate
impl Debug for SymbolCandidate
Source§impl Display for SymbolCandidate
impl Display for SymbolCandidate
impl Eq for SymbolCandidate
Source§impl PartialEq for SymbolCandidate
impl PartialEq for SymbolCandidate
Source§impl Serialize for SymbolCandidate
impl Serialize for SymbolCandidate
impl StructuralPartialEq for SymbolCandidate
Auto Trait Implementations§
impl Freeze for SymbolCandidate
impl RefUnwindSafe for SymbolCandidate
impl Send for SymbolCandidate
impl Sync for SymbolCandidate
impl Unpin for SymbolCandidate
impl UnsafeUnpin for SymbolCandidate
impl UnwindSafe for SymbolCandidate
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.