Trait tauri_runtime::RuntimeHandle
source · [−]pub trait RuntimeHandle<T: UserEvent>: Debug + Clone + Send + Sync + Sized + 'static {
type Runtime: Runtime<T, Handle = Self>;
fn create_proxy(&self) -> <Self::Runtime as Runtime<T>>::EventLoopProxy;
fn create_window(
&self,
pending: PendingWindow<T, Self::Runtime>
) -> Result<DetachedWindow<T, Self::Runtime>>;
fn run_on_main_thread<F: FnOnce() + Send + 'static>(
&self,
f: F
) -> Result<()>;
}
Expand description
A Send
handle to the runtime.
Associated Types
Required methods
fn create_proxy(&self) -> <Self::Runtime as Runtime<T>>::EventLoopProxy
fn create_proxy(&self) -> <Self::Runtime as Runtime<T>>::EventLoopProxy
Creates an EventLoopProxy
that can be used to dispatch user events to the main event loop.
fn create_window(
&self,
pending: PendingWindow<T, Self::Runtime>
) -> Result<DetachedWindow<T, Self::Runtime>>
fn create_window(
&self,
pending: PendingWindow<T, Self::Runtime>
) -> Result<DetachedWindow<T, Self::Runtime>>
Create a new webview window.