pub trait EventEmitter {
// Required method
fn emit<P: Serialize + Clone>(
&self,
kind: EventKind,
payload: P,
) -> Result<(), AppError>;
}Expand description
Abstraction over anything that can emit Tauri-style events.
tauri::AppHandle implements this via the real Tauri runtime.
MockChannel implements it for tests.
Required Methods§
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.