Trait tauri_runtime::RuntimeHandle
source · [−]pub trait RuntimeHandle: Debug + Clone + Send + Sync + Sized + 'static {
type Runtime: Runtime<Handle = Self>;
fn create_window(
&self,
pending: PendingWindow<Self::Runtime>
) -> Result<DetachedWindow<Self::Runtime>>;
fn run_on_main_thread<F: FnOnce() + Send + 'static>(
&self,
f: F
) -> Result<()>;
fn remove_system_tray(&self) -> Result<()>;
}
Expand description
A Send
handle to the runtime.
Associated Types
Required methods
fn create_window(
&self,
pending: PendingWindow<Self::Runtime>
) -> Result<DetachedWindow<Self::Runtime>>
fn create_window(
&self,
pending: PendingWindow<Self::Runtime>
) -> Result<DetachedWindow<Self::Runtime>>
Create a new webview window.
Run a task on the main thread.
fn remove_system_tray(&self) -> Result<()>
fn remove_system_tray(&self) -> Result<()>
This is supported on Windows and crate feature
system-tray
only.