Struct tauri::test::MockRuntime
source · pub struct MockRuntime {
pub context: RuntimeContext,
/* private fields */
}
Available on crate feature
test
only.Fields§
§context: RuntimeContext
Trait Implementations§
source§impl Debug for MockRuntime
impl Debug for MockRuntime
source§impl<T: UserEvent> Runtime<T> for MockRuntime
impl<T: UserEvent> Runtime<T> for MockRuntime
§type Dispatcher = MockDispatcher
type Dispatcher = MockDispatcher
The message dispatcher.
§type Handle = MockRuntimeHandle
type Handle = MockRuntimeHandle
The runtime handle type.
§type GlobalShortcutManager = MockGlobalShortcutManager
type GlobalShortcutManager = MockGlobalShortcutManager
The global shortcut manager type.
§type TrayHandler = MockTrayHandler
type TrayHandler = MockTrayHandler
The tray handler type.
§type EventLoopProxy = EventProxy
type EventLoopProxy = EventProxy
The proxy type.
source§fn create_proxy(&self) -> EventProxy
fn create_proxy(&self) -> EventProxy
Creates an
EventLoopProxy
that can be used to dispatch user events to the main event loop.source§fn global_shortcut_manager(&self) -> Self::GlobalShortcutManager
fn global_shortcut_manager(&self) -> Self::GlobalShortcutManager
Gets the global shortcut manager.
source§fn create_window(
&self,
pending: PendingWindow<T, Self>
) -> Result<DetachedWindow<T, Self>>
fn create_window( &self, pending: PendingWindow<T, Self> ) -> Result<DetachedWindow<T, Self>>
Create a new webview window.
source§fn system_tray(&self, system_tray: SystemTray) -> Result<Self::TrayHandler>
fn system_tray(&self, system_tray: SystemTray) -> Result<Self::TrayHandler>
Adds the icon to the system tray with the specified menu items.
source§fn on_system_tray_event<F: Fn(TrayId, &SystemTrayEvent) + Send + 'static>(
&mut self,
f: F
)
fn on_system_tray_event<F: Fn(TrayId, &SystemTrayEvent) + Send + 'static>( &mut self, f: F )
Registers a system tray event handler.
source§fn set_activation_policy(&mut self, activation_policy: ActivationPolicy)
fn set_activation_policy(&mut self, activation_policy: ActivationPolicy)
Sets the activation policy for the application. It is set to
NSApplicationActivationPolicyRegular
by default.source§fn set_device_event_filter(&mut self, filter: DeviceEventFilter)
fn set_device_event_filter(&mut self, filter: DeviceEventFilter)
Change the device event filter mode. Read more
source§fn run_iteration<F: Fn(RunEvent<T>) + 'static>(
&mut self,
callback: F
) -> RunIteration
fn run_iteration<F: Fn(RunEvent<T>) + 'static>( &mut self, callback: F ) -> RunIteration
Runs the one step of the webview runtime event loop and returns control flow to the caller.
Auto Trait Implementations§
impl Freeze for MockRuntime
impl !RefUnwindSafe for MockRuntime
impl Send for MockRuntime
impl !Sync for MockRuntime
impl Unpin for MockRuntime
impl !UnwindSafe for MockRuntime
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more