Trait UpdaterExt

Source
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§

Source

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(())
  });
Source

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(())
  });

Implementors§

Source§

impl<R: Runtime, T: Manager<R>> UpdaterExt<R> for T

OSZAR »