DependencyInfo

Trait DependencyInfo 

Source
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§

Source

fn name(&self) -> &str

Dependency name (package/crate name).

Source

fn name_range(&self) -> Range

LSP range of the dependency name in the source file.

Source

fn version_requirement(&self) -> Option<&str>

Version requirement string (e.g., “^1.0”, “~2.3.4”).

Source

fn version_range(&self) -> Option<Range>

LSP range of the version string (for inlay hints positioning).

Source

fn source(&self) -> DependencySource

Dependency source (registry, git, path).

Provided Methods§

Source

fn features(&self) -> &[String]

Feature flags requested (Cargo-specific, empty for npm).

Implementors§