pub struct CargoEcosystem { /* private fields */ }Expand description
Cargo ecosystem implementation.
Provides LSP functionality for Cargo.toml files, including:
- Dependency parsing with position tracking
- Version information from crates.io
- Inlay hints for latest versions
- Hover tooltips with package metadata
- Code actions for version updates
- Diagnostics for unknown/yanked packages
Implementations§
Trait Implementations§
Source§impl Ecosystem for CargoEcosystem
impl Ecosystem for CargoEcosystem
Source§fn display_name(&self) -> &'static str
fn display_name(&self) -> &'static str
Human-readable name (e.g., “Cargo (Rust)”, “npm (JavaScript)”) Read more
Source§fn manifest_filenames(&self) -> &[&'static str]
fn manifest_filenames(&self) -> &[&'static str]
Manifest filenames this ecosystem handles (e.g., [“Cargo.toml”]) Read more
Source§fn lockfile_filenames(&self) -> &[&'static str]
fn lockfile_filenames(&self) -> &[&'static str]
Lock file filenames this ecosystem uses (e.g., [“Cargo.lock”]) Read more
Source§fn parse_manifest<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
content: &'life1 str,
uri: &'life2 Uri,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ParseResultTrait>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn parse_manifest<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
content: &'life1 str,
uri: &'life2 Uri,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ParseResultTrait>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Parse a manifest file and return parsed result Read more
Source§fn lockfile_provider(&self) -> Option<Arc<dyn LockFileProvider>>
fn lockfile_provider(&self) -> Option<Arc<dyn LockFileProvider>>
Get the lock file provider for this ecosystem. Read more
Source§fn generate_inlay_hints<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
parse_result: &'life1 dyn ParseResultTrait,
cached_versions: &'life2 HashMap<String, String>,
resolved_versions: &'life3 HashMap<String, String>,
loading_state: LoadingState,
config: &'life4 EcosystemConfig,
) -> Pin<Box<dyn Future<Output = Vec<InlayHint>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn generate_inlay_hints<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
parse_result: &'life1 dyn ParseResultTrait,
cached_versions: &'life2 HashMap<String, String>,
resolved_versions: &'life3 HashMap<String, String>,
loading_state: LoadingState,
config: &'life4 EcosystemConfig,
) -> Pin<Box<dyn Future<Output = Vec<InlayHint>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Generate inlay hints for the document Read more
Source§fn generate_hover<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
parse_result: &'life1 dyn ParseResultTrait,
position: Position,
cached_versions: &'life2 HashMap<String, String>,
resolved_versions: &'life3 HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Option<Hover>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn generate_hover<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
parse_result: &'life1 dyn ParseResultTrait,
position: Position,
cached_versions: &'life2 HashMap<String, String>,
resolved_versions: &'life3 HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Option<Hover>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Generate hover information for a position Read more
Source§fn generate_code_actions<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
parse_result: &'life1 dyn ParseResultTrait,
position: Position,
_cached_versions: &'life2 HashMap<String, String>,
uri: &'life3 Uri,
) -> Pin<Box<dyn Future<Output = Vec<CodeAction>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn generate_code_actions<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
parse_result: &'life1 dyn ParseResultTrait,
position: Position,
_cached_versions: &'life2 HashMap<String, String>,
uri: &'life3 Uri,
) -> Pin<Box<dyn Future<Output = Vec<CodeAction>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Generate code actions for a position Read more
Source§fn generate_diagnostics<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
parse_result: &'life1 dyn ParseResultTrait,
cached_versions: &'life2 HashMap<String, String>,
resolved_versions: &'life3 HashMap<String, String>,
_uri: &'life4 Uri,
) -> Pin<Box<dyn Future<Output = Vec<Diagnostic>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn generate_diagnostics<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
parse_result: &'life1 dyn ParseResultTrait,
cached_versions: &'life2 HashMap<String, String>,
resolved_versions: &'life3 HashMap<String, String>,
_uri: &'life4 Uri,
) -> Pin<Box<dyn Future<Output = Vec<Diagnostic>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Generate diagnostics for the document Read more
Source§fn generate_completions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
parse_result: &'life1 dyn ParseResultTrait,
position: Position,
content: &'life2 str,
) -> Pin<Box<dyn Future<Output = Vec<CompletionItem>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn generate_completions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
parse_result: &'life1 dyn ParseResultTrait,
position: Position,
content: &'life2 str,
) -> Pin<Box<dyn Future<Output = Vec<CompletionItem>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Generate completions for a position Read more
Auto Trait Implementations§
impl Freeze for CargoEcosystem
impl !RefUnwindSafe for CargoEcosystem
impl Send for CargoEcosystem
impl Sync for CargoEcosystem
impl Unpin for CargoEcosystem
impl !UnwindSafe for CargoEcosystem
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