pub trait VersionFetcher: Send + Sync {
// Required methods
fn tool_name(&self) -> &str;
fn fetch_versions<'life0, 'async_trait>(
&'life0 self,
include_prerelease: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<VersionInfo>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn get_latest_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<VersionInfo>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn get_latest_version_including_prerelease<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<VersionInfo>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn version_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
version: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
Trait for fetching version information from external sources
Required Methods§
Sourcefn fetch_versions<'life0, 'async_trait>(
&'life0 self,
include_prerelease: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<VersionInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fetch_versions<'life0, 'async_trait>(
&'life0 self,
include_prerelease: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<VersionInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch available versions for the tool
Provided Methods§
Sourcefn get_latest_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<VersionInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_latest_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<VersionInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the latest stable version
Sourcefn get_latest_version_including_prerelease<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<VersionInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_latest_version_including_prerelease<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<VersionInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the latest version (including prereleases)