pub trait AppUpdater: Send + Sync {
// Provided methods
fn capabilities(&self) -> AppUpdateCapabilities { ... }
fn check(&self, source: &GitHubReleaseUpdate) -> Result<(), AppUpdateError> { ... }
fn install(&self, package: &UpdatePackage) -> Result<(), AppUpdateError> { ... }
}Expand description
Platform implementation for update discovery and package installation.
Provided Methods§
Sourcefn capabilities(&self) -> AppUpdateCapabilities
fn capabilities(&self) -> AppUpdateCapabilities
What this backend can do.
Defaults to neither, so a backend states what it can do rather than inheriting a claim: the two entry points below refuse a half a backend has not claimed, and a backend that forgot to declare one is refused rather than allowed to fail at the platform boundary.
Sourcefn check(&self, source: &GitHubReleaseUpdate) -> Result<(), AppUpdateError>
fn check(&self, source: &GitHubReleaseUpdate) -> Result<(), AppUpdateError>
Starts release discovery. Progress is published through
set_app_update_status.
Sourcefn install(&self, package: &UpdatePackage) -> Result<(), AppUpdateError>
fn install(&self, package: &UpdatePackage) -> Result<(), AppUpdateError>
Transfers a package to the platform installer.
An implementation checks the package against
UpdatePackage::digest before committing it — nothing is installed
whose bytes were not the ones the release feed promised.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".