Trait velopack::sources::UpdateSource
source · pub trait UpdateSource: Clone + Send + Sync {
// Required methods
fn get_release_feed(
&self,
channel: &str,
app: &Manifest
) -> Result<VelopackAssetFeed>;
fn download_release_entry<A>(
&self,
asset: &VelopackAsset,
local_file: &str,
progress: A
) -> Result<()>
where A: FnMut(i16);
}Expand description
Abstraction for finding and downloading updates from a package source / repository. An implementation may copy a file from a local repository, download from a web address, or even use third party services and parse proprietary data to produce a package feed.
Required Methods§
sourcefn get_release_feed(
&self,
channel: &str,
app: &Manifest
) -> Result<VelopackAssetFeed>
fn get_release_feed( &self, channel: &str, app: &Manifest ) -> Result<VelopackAssetFeed>
Retrieve the list of available remote releases from the package source. These releases can subsequently be downloaded with download_release_entry.
sourcefn download_release_entry<A>(
&self,
asset: &VelopackAsset,
local_file: &str,
progress: A
) -> Result<()>
fn download_release_entry<A>( &self, asset: &VelopackAsset, local_file: &str, progress: A ) -> Result<()>
Download the specified VelopackAsset to the provided local file path.
Object Safety§
This trait is not object safe.