pub trait UpdaterExt<R: Runtime> {
// Required methods
fn updater_builder(&self) -> UpdaterBuilder;
fn updater(&self) -> Result<Updater>;
}
Expand description
Extensions to tauri::App
, tauri::AppHandle
, tauri::WebviewWindow
, tauri::Webview
and tauri::Window
to access the updater APIs.
Required Methods§
Sourcefn updater_builder(&self) -> UpdaterBuilder
fn updater_builder(&self) -> UpdaterBuilder
Gets the updater builder to build and updater that can manually check if an update is available.
§Examples
use tauri_plugin_updater::UpdaterExt;
tauri::Builder::default()
.setup(|app| {
let handle = app.handle().clone();
tauri::async_runtime::spawn(async move {
let response = handle.updater_builder().build().unwrap().check().await;
});
Ok(())
});
Sourcefn updater(&self) -> Result<Updater>
fn updater(&self) -> Result<Updater>
Gets the updater to manually check if an update is available.
§Examples
use tauri_plugin_updater::UpdaterExt;
tauri::Builder::default()
.setup(|app| {
let handle = app.handle().clone();
tauri::async_runtime::spawn(async move {
let response = handle.updater().unwrap().check().await;
});
Ok(())
});