Trait tauri::Runtime
pub trait Runtime: 'static {
type Dispatcher: Dispatch;
type Handle: RuntimeHandle;
type GlobalShortcutManager: GlobalShortcutManager + Clone + Send;
type ClipboardManager: ClipboardManager + Clone + Send;
fn new() -> Result<Self, Error>;
fn handle(&self) -> Self::Handle;
fn global_shortcut_manager(&self) -> Self::GlobalShortcutManager;
fn clipboard_manager(&self) -> Self::ClipboardManager;
fn create_window(
&self,
pending: PendingWindow<Self>
) -> Result<DetachedWindow<Self>, Error>;
fn run<F>(self, callback: F)
where
F: 'static + Fn(RunEvent);
}
Expand description
The webview runtime interface.
#
Associated TypesDispatcher: Dispatch#
typeThe message dispatcher.
Handle: RuntimeHandle#
typeThe runtime handle type.
GlobalShortcutManager: GlobalShortcutManager + Clone + Send#
typeThe global shortcut manager type.
ClipboardManager: ClipboardManager + Clone + Send#
typeThe clipboard manager type.
#
Required methodsnew() -> Result<Self, Error>#
fnCreates a new webview runtime.
handle(&self) -> Self::Handle#
fnGets a runtime handle.
global_shortcut_manager(&self) -> Self::GlobalShortcutManager#
fnGets the global shortcut manager.
clipboard_manager(&self) -> Self::ClipboardManager#
fnGets the clipboard manager.
create_window( &self, pending: PendingWindow<Self> ) -> Result<DetachedWindow<Self>, Error>#
fnCreate a new webview window.
run<F>(self, callback: F) where F: 'static + Fn(RunEvent),#
fnRun the webview runtime.