pub trait CrateVersionResolver {
// Required method
fn resolve_latest(&self, crate_name: &str) -> Result<String>;
// Provided methods
fn resolve_latest_for_channel(
&self,
crate_name: &str,
_channel: ToolchainChannel,
) -> Result<String> { ... }
fn resolve_research_version(
&self,
crate_name: &str,
) -> Result<ResearchVersion> { ... }
}Required Methods§
fn resolve_latest(&self, crate_name: &str) -> Result<String>
Provided Methods§
Sourcefn resolve_latest_for_channel(
&self,
crate_name: &str,
_channel: ToolchainChannel,
) -> Result<String>
fn resolve_latest_for_channel( &self, crate_name: &str, _channel: ToolchainChannel, ) -> Result<String>
Channel-aware resolution. The research (rnd) lane publishes base-name
crates at X.Y.Z-research PRERELEASES (greentic-runner’s
research-publish.yml), which resolve_latest’s max_stable_version
preference silently skips — so the dev/stable behaviour returns the old
stable (e.g. 0.5.x) instead of the current 1.2.0-research. The
default delegates to resolve_latest (correct for dev/stable).
Sourcefn resolve_research_version(&self, crate_name: &str) -> Result<ResearchVersion>
fn resolve_research_version(&self, crate_name: &str) -> Result<ResearchVersion>
Resolve the research (-rnd) version, distinguishing an unpublished
crate (HTTP 404 → ResearchVersion::Absent) from a genuine resolution
error. The default treats every resolvable crate as
ResearchVersion::Pinned; only the crates.io resolver can observe a
404, so it overrides this.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".