Skip to main content

Module events

Module events 

Source
Expand description

Typed event emission helper.

§OCP contract

  • EventKind::as_str() is the single canonical name source for all server→client event names. Adding an event means adding one variant plus one match arm — no other site changes.
  • The EventEmitter trait + MockChannel ensure the same code path runs in tests and production. Tests never reach the Tauri runtime.

§Usage

events::emit(&app_handle, EventKind::ObjectsUpdated, payload)?;

Enums§

EventKind
Every event that the backend can emit to the frontend.

Traits§

EventEmitter
Abstraction over anything that can emit Tauri-style events.

Functions§

emit
Emit an event through any EventEmitter channel.