pub trait AppUpdateHost:
Clone
+ Send
+ Sync
+ 'static {
// Required methods
fn spawn_detached(&self, task: BoxFuture<'static, ()>);
fn current_app_version(&self) -> Result<String, UpdateError>;
fn check_app_update<'a>(
&'a self,
current_version: &'a str,
) -> BoxFuture<'a, Result<Option<UpdatePackageInfo>, UpdateError>>;
fn download_app_update<'a>(
&'a self,
update: &'a UpdatePackageInfo,
progress: AppUpdateProgressReporter,
) -> BoxFuture<'a, Result<PathBuf, UpdateError>>;
fn install_app_update(
&self,
package_path: &Path,
info_json: &str,
) -> Result<(), UpdateError>;
fn log_app_update_warning(&self, detail: &str);
}Required Methods§
fn spawn_detached(&self, task: BoxFuture<'static, ()>)
fn current_app_version(&self) -> Result<String, UpdateError>
fn check_app_update<'a>( &'a self, current_version: &'a str, ) -> BoxFuture<'a, Result<Option<UpdatePackageInfo>, UpdateError>>
fn download_app_update<'a>( &'a self, update: &'a UpdatePackageInfo, progress: AppUpdateProgressReporter, ) -> BoxFuture<'a, Result<PathBuf, UpdateError>>
Sourcefn install_app_update(
&self,
package_path: &Path,
info_json: &str,
) -> Result<(), UpdateError>
fn install_app_update( &self, package_path: &Path, info_json: &str, ) -> Result<(), UpdateError>
Hand off the downloaded package to the platform installer. info_json
carries the prompt metadata {version, releaseNotes, isForceUpdate}:
the platform shows release notes in the “ready to update” prompt and,
when isForceUpdate is true, presents a blocking “must update” prompt
instead of the dismissible reminder.
fn log_app_update_warning(&self, detail: &str)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".