pub enum SymbolResolutionData {
Ambiguous {
name: String,
candidates: Vec<SymbolCandidate>,
truncated: bool,
},
NotFound {
name: String,
excluded_by_filters: usize,
},
NotDefinedInFile {
name: String,
},
PositionUnverified {
name: String,
candidate: SymbolCandidate,
},
}Expand description
Why a symbol name could not be resolved to exactly one position.
Carried as the structured data of the INVALID_PARAMS error, tagged by
resolution.
§Examples
use mcpls_core::error::SymbolResolutionData;
let missing = SymbolResolutionData::NotDefinedInFile { name: "Config".to_string() };
assert_eq!(
serde_json::to_value(&missing).unwrap(),
serde_json::json!({"resolution": "not_defined_in_file", "name": "Config"})
);Variants§
Ambiguous
The name matches several symbols; nothing was picked.
Fields
§
candidates: Vec<SymbolCandidate>The matching symbols, capped.
NotFound
No symbol of that name (and kind/container) is defined in the file.
Fields
NotDefinedInFile
The name occurs in the file but no symbol defines it there (an import or a plain reference).
PositionUnverified
A symbol matched but its identifier position could not be verified against the document text, so no query was made.
Trait Implementations§
Source§impl Clone for SymbolResolutionData
impl Clone for SymbolResolutionData
Source§impl Debug for SymbolResolutionData
impl Debug for SymbolResolutionData
Source§impl Display for SymbolResolutionData
impl Display for SymbolResolutionData
impl Eq for SymbolResolutionData
Source§impl PartialEq for SymbolResolutionData
impl PartialEq for SymbolResolutionData
Source§impl Serialize for SymbolResolutionData
impl Serialize for SymbolResolutionData
impl StructuralPartialEq for SymbolResolutionData
Auto Trait Implementations§
impl Freeze for SymbolResolutionData
impl RefUnwindSafe for SymbolResolutionData
impl Send for SymbolResolutionData
impl Sync for SymbolResolutionData
impl Unpin for SymbolResolutionData
impl UnsafeUnpin for SymbolResolutionData
impl UnwindSafe for SymbolResolutionData
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.