pub trait NotificationExt<R: Runtime> {
// Required method
fn notification(&self) -> &Notification<R>;
}Expand description
Extensions to tauri::App, tauri::AppHandle, tauri::WebviewWindow, tauri::Webview and tauri::Window to access the notification APIs.
Required Methods§
Sourcefn notification(&self) -> &Notification<R>
fn notification(&self) -> &Notification<R>
Returns the notification APIs managed by the plugin.
§Examples
use tauri_plugin_notification::NotificationExt;
fn notify<R: tauri::Runtime>(app: &tauri::AppHandle<R>) {
app.notification()
.builder()
.title("Tauri")
.body("Tauri is awesome!")
.show()
.unwrap();
}Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".