pub trait LxAppUpdateHost:
Clone
+ Send
+ Sync
+ 'static {
Show 18 methods
// Required methods
fn spawn_detached(&self, task: BoxFuture<'static, ()>);
fn target_appid(&self) -> &str;
fn channel(&self) -> ReleaseType;
fn runtime_version(&self) -> &str;
fn current_version_hint(&self) -> Option<String>;
fn installed_version<'a>(
&'a self,
) -> BoxFuture<'a, Result<Option<String>, UpdateError>>;
fn is_installed<'a>(&'a self) -> BoxFuture<'a, Result<bool, UpdateError>>;
fn check_latest_update<'a>(
&'a self,
current_version: Option<&'a str>,
) -> BoxFuture<'a, Result<Option<UpdatePackageInfo>, UpdateError>>;
fn check_exact_update<'a>(
&'a self,
target_version: &'a str,
) -> BoxFuture<'a, Result<Option<UpdatePackageInfo>, UpdateError>>;
fn has_downloaded_update<'a>(
&'a self,
version: &'a str,
) -> BoxFuture<'a, Result<bool, UpdateError>>;
fn download_update<'a>(
&'a self,
update: &'a UpdatePackageInfo,
) -> BoxFuture<'a, Result<(), UpdateError>>;
fn wait_for_or_start_force_download<'a>(
&'a self,
update: &'a UpdatePackageInfo,
) -> BoxFuture<'a, Result<(), UpdateError>>;
fn emit_update_ready(
&self,
version: &str,
is_force_update: bool,
) -> Result<(), UpdateError>;
fn emit_update_failed(
&self,
update: &UpdatePackageInfo,
error: &str,
) -> Result<(), UpdateError>;
fn is_bundled_available(&self) -> bool;
fn register_builtin_bundle(&self) -> Result<(), UpdateError>;
fn has_update_provider(&self) -> bool;
fn log_warning(&self, detail: &str);
}Required Methods§
fn spawn_detached(&self, task: BoxFuture<'static, ()>)
fn target_appid(&self) -> &str
fn channel(&self) -> ReleaseType
fn runtime_version(&self) -> &str
fn current_version_hint(&self) -> Option<String>
fn installed_version<'a>( &'a self, ) -> BoxFuture<'a, Result<Option<String>, UpdateError>>
fn is_installed<'a>(&'a self) -> BoxFuture<'a, Result<bool, UpdateError>>
fn check_latest_update<'a>( &'a self, current_version: Option<&'a str>, ) -> BoxFuture<'a, Result<Option<UpdatePackageInfo>, UpdateError>>
fn check_exact_update<'a>( &'a self, target_version: &'a str, ) -> BoxFuture<'a, Result<Option<UpdatePackageInfo>, UpdateError>>
fn has_downloaded_update<'a>( &'a self, version: &'a str, ) -> BoxFuture<'a, Result<bool, UpdateError>>
fn download_update<'a>( &'a self, update: &'a UpdatePackageInfo, ) -> BoxFuture<'a, Result<(), UpdateError>>
fn wait_for_or_start_force_download<'a>( &'a self, update: &'a UpdatePackageInfo, ) -> BoxFuture<'a, Result<(), UpdateError>>
fn emit_update_ready( &self, version: &str, is_force_update: bool, ) -> Result<(), UpdateError>
fn emit_update_failed( &self, update: &UpdatePackageInfo, error: &str, ) -> Result<(), UpdateError>
fn is_bundled_available(&self) -> bool
fn register_builtin_bundle(&self) -> Result<(), UpdateError>
fn has_update_provider(&self) -> bool
fn log_warning(&self, detail: &str)
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.