pub struct PypiEcosystem { /* private fields */ }Expand description
PyPI ecosystem implementation.
Provides LSP functionality for pyproject.toml files, including:
- Dependency parsing with position tracking
- Version information from PyPI registry
- Inlay hints for latest versions
- Hover tooltips with package metadata
- Code actions for version updates
- Diagnostics for unknown/yanked packages
Implementations§
Source§impl PypiEcosystem
impl PypiEcosystem
Sourcepub fn new(cache: Arc<HttpCache>) -> PypiEcosystem
pub fn new(cache: Arc<HttpCache>) -> PypiEcosystem
Creates a new PyPI ecosystem with the given HTTP cache.
Trait Implementations§
Source§impl Ecosystem for PypiEcosystem
impl Ecosystem for PypiEcosystem
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 ParseResult>, DepsError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PypiEcosystem: '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 ParseResult>, DepsError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PypiEcosystem: '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 ParseResult,
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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
PypiEcosystem: 'async_trait,
fn generate_inlay_hints<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
parse_result: &'life1 dyn ParseResult,
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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
PypiEcosystem: '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 ParseResult,
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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PypiEcosystem: 'async_trait,
fn generate_hover<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
parse_result: &'life1 dyn ParseResult,
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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PypiEcosystem: '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 ParseResult,
position: Position,
_cached_versions: &'life2 HashMap<String, String>,
uri: &'life3 Uri,
) -> Pin<Box<dyn Future<Output = Vec<CodeAction>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PypiEcosystem: 'async_trait,
fn generate_code_actions<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
parse_result: &'life1 dyn ParseResult,
position: Position,
_cached_versions: &'life2 HashMap<String, String>,
uri: &'life3 Uri,
) -> Pin<Box<dyn Future<Output = Vec<CodeAction>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PypiEcosystem: '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 ParseResult,
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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
PypiEcosystem: 'async_trait,
fn generate_diagnostics<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
parse_result: &'life1 dyn ParseResult,
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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
PypiEcosystem: 'async_trait,
Generate diagnostics for the document Read more
Source§fn generate_completions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
parse_result: &'life1 dyn ParseResult,
position: Position,
content: &'life2 str,
) -> Pin<Box<dyn Future<Output = Vec<CompletionItem>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PypiEcosystem: 'async_trait,
fn generate_completions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
parse_result: &'life1 dyn ParseResult,
position: Position,
content: &'life2 str,
) -> Pin<Box<dyn Future<Output = Vec<CompletionItem>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PypiEcosystem: 'async_trait,
Generate completions for a position Read more
Auto Trait Implementations§
impl Freeze for PypiEcosystem
impl !RefUnwindSafe for PypiEcosystem
impl Send for PypiEcosystem
impl Sync for PypiEcosystem
impl Unpin for PypiEcosystem
impl !UnwindSafe for PypiEcosystem
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more