Skip to main content

Provider

Trait Provider 

Source
pub trait Provider {
    // Required methods
    fn id(&self) -> &str;
    fn list_versions(&self) -> VtaResult<Vec<String>>;
    fn resolve(&self, version: &str, platform: &Platform) -> VtaResult<Artifact>;
}
Expand description

Describes how to discover and resolve a tool’s artifacts (docs/07-providers.md, docs/22-provider-sdk.md).

Required Methods§

Source

fn id(&self) -> &str

The provider id, e.g. "official/node".

Source

fn list_versions(&self) -> VtaResult<Vec<String>>

The available version strings, newest-first ordering applied by the resolver.

Source

fn resolve(&self, version: &str, platform: &Platform) -> VtaResult<Artifact>

The artifact descriptor for a version on a platform.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§