Skip to main content

AppUpdateHost

Trait AppUpdateHost 

Source
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 show_builtin_update_prompt<'a>(
        &'a self,
        update: &'a UpdatePackageInfo,
    ) -> BoxFuture<'a, Result<bool, 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) -> Result<(), UpdateError>;
    fn log_app_update_warning(&self, detail: &str);
    fn notify_app_update_available(
        &self,
        update: &UpdatePackageInfo,
    ) -> Result<(), UpdateError>;
}

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§