pub trait VersionSource: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn fetch_latest<'life0, 'async_trait>(
&'life0 self,
options: FetchOptions,
) -> Pin<Box<dyn Future<Output = VersionSourceResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn fetch_versions<'life0, 'async_trait>(
&'life0 self,
_options: FetchVersionsOptions,
) -> Pin<Box<dyn Future<Output = Result<VersionListResult, UpdateKitError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
Trait for version sources that can check for updates.
Required Methods§
Sourcefn fetch_latest<'life0, 'async_trait>(
&'life0 self,
options: FetchOptions,
) -> Pin<Box<dyn Future<Output = VersionSourceResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fetch_latest<'life0, 'async_trait>(
&'life0 self,
options: FetchOptions,
) -> Pin<Box<dyn Future<Output = VersionSourceResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch the latest version from this source.
Provided Methods§
Sourcefn fetch_versions<'life0, 'async_trait>(
&'life0 self,
_options: FetchVersionsOptions,
) -> Pin<Box<dyn Future<Output = Result<VersionListResult, UpdateKitError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fetch_versions<'life0, 'async_trait>(
&'life0 self,
_options: FetchVersionsOptions,
) -> Pin<Box<dyn Future<Output = Result<VersionListResult, UpdateKitError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch a paginated list of versions. Not all sources support this.