pub trait ParseResult: Send + Sync {
// Required methods
fn dependencies(&self) -> Vec<&dyn Dependency>;
fn workspace_root(&self) -> Option<&Path>;
fn uri(&self) -> &Uri;
fn as_any(&self) -> &dyn Any;
// Provided method
fn blocked_registries(&self) -> Vec<(Range, HostClass, String)> { ... }
}Expand description
Parse result trait containing dependencies and metadata.
Implementations hold ecosystem-specific dependency types but expose them through trait object interfaces.
Required Methods§
Sourcefn dependencies(&self) -> Vec<&dyn Dependency>
fn dependencies(&self) -> Vec<&dyn Dependency>
All dependencies found in the manifest
Sourcefn workspace_root(&self) -> Option<&Path>
fn workspace_root(&self) -> Option<&Path>
Workspace root path (for monorepo support)
Provided Methods§
Sourcefn blocked_registries(&self) -> Vec<(Range, HostClass, String)>
fn blocked_registries(&self) -> Vec<(Range, HostClass, String)>
Dependency lines whose registry-index resolution was blocked by a workspace-registry
reachability policy (spec .local/specs/023-cargo-custom-registries/plan-1b.md §1.7,
#443) — (name_range, blocked host class, raw declared value) triples, where the raw
value is the exact registry/registry-index alias or URL the dependency declared
(so two different blocked aliases render as two distinguishable messages, not one
byte-identical warning). Used by
crate::lsp_helpers::generate_diagnostics_from_cache to surface an
[tower_lsp_server::ls_types::DiagnosticSeverity::INFORMATION] diagnostic on the
blocked dependency’s line so the block never degrades silently.
Default empty — only deps_cargo::parser::ParseResult overrides this today;
every other ecosystem has no equivalent reachability policy to report.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".