pub trait DependencyInfo {
// Required methods
fn name(&self) -> &str;
fn name_range(&self) -> Range;
fn version_requirement(&self) -> Option<&str>;
fn version_range(&self) -> Option<Range>;
fn source(&self) -> DependencySource;
// Provided method
fn features(&self) -> &[String] { ... }
}Expand description
Dependency information trait.
All parsed dependencies must implement this for generic handler access.
§Note
The new Ecosystem trait uses crate::ecosystem::Dependency instead.
This trait is kept for backward compatibility during migration.
Required Methods§
Sourcefn name_range(&self) -> Range
fn name_range(&self) -> Range
LSP range of the dependency name in the source file.
Sourcefn version_requirement(&self) -> Option<&str>
fn version_requirement(&self) -> Option<&str>
Version requirement string (e.g., “^1.0”, “~2.3.4”).
Sourcefn version_range(&self) -> Option<Range>
fn version_range(&self) -> Option<Range>
LSP range of the version string (for inlay hints positioning).
Sourcefn source(&self) -> DependencySource
fn source(&self) -> DependencySource
Dependency source (registry, git, path).