Struct VersoRuntime

Source
pub struct VersoRuntime<T: UserEvent = EventLoopMessage> {
    pub context: RuntimeContext<T>,
    /* private fields */
}
Expand description

A Tauri Runtime wrapper around Verso.

Fields§

§context: RuntimeContext<T>

Trait Implementations§

Source§

impl<T: Debug + UserEvent> Debug for VersoRuntime<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: UserEvent> Runtime<T> for VersoRuntime<T>

Source§

fn new(args: RuntimeInitArgs) -> Result<Self>

args.msg_hook hooks on the event loop of this process, this doesn’t work for the event loop of versoview instances

Source§

fn create_window<F: Fn(RawWindow<'_>) + Send + 'static>( &self, pending: PendingWindow<T, Self>, after_window_creation: Option<F>, ) -> Result<DetachedWindow<T, Self>>

after_window_creation not supported

Only creating the window with a webview is supported, will return [tauri_runtime::Error::CreateWindow] if there is no [PendingWindow::webview]

Source§

fn create_webview( &self, window_id: WindowId, pending: PendingWebview<T, Self>, ) -> Result<DetachedWebview<T, Self>>

Unsupported, always fail with [tauri_runtime::Error::CreateWindow]

Source§

fn set_activation_policy(&mut self, activation_policy: ActivationPolicy)

Unsupported, has no effect when called

Source§

fn show(&self)

Unsupported, has no effect when called

Source§

fn hide(&self)

Unsupported, has no effect when called

Source§

fn set_dock_visibility(&mut self, visible: bool)

Unsupported, has no effect

Source§

fn set_device_event_filter(&mut self, filter: DeviceEventFilter)

Unsupported, has no effect when called

Source§

fn run_iteration<F: FnMut(RunEvent<T>)>(&mut self, callback: F)

Unsupported, has no effect when called

Source§

type WindowDispatcher = VersoWindowDispatcher<T>

The window message dispatcher.
Source§

type WebviewDispatcher = VersoWebviewDispatcher<T>

The webview message dispatcher.
Source§

type Handle = VersoRuntimeHandle<T>

The runtime handle type.
Source§

type EventLoopProxy = EventProxy<T>

The proxy type.
Source§

fn create_proxy(&self) -> EventProxy<T>

Creates an EventLoopProxy that can be used to dispatch user events to the main event loop.
Source§

fn handle(&self) -> Self::Handle

Gets a runtime handle.
Source§

fn primary_monitor(&self) -> Option<Monitor>

Returns the primary monitor of the system. Read more
Source§

fn monitor_from_point(&self, x: f64, y: f64) -> Option<Monitor>

Returns the monitor that contains the given point.
Source§

fn available_monitors(&self) -> Vec<Monitor>

Returns the list of all the monitors available on the system.
Source§

fn cursor_position(&self) -> Result<PhysicalPosition<f64>>

Get the cursor position relative to the top-left hand corner of the desktop.
Source§

fn set_theme(&self, theme: Option<Theme>)

Sets the app theme.
Source§

fn run<F: FnMut(RunEvent<T>) + 'static>(self, callback: F)

Run the webview runtime.
Source§

fn run_return<F: FnMut(RunEvent<T>) + 'static>(self, callback: F) -> i32

Equivalent to [Runtime::run] but returns the exit code instead of exiting the process.

Auto Trait Implementations§

§

impl<T> Freeze for VersoRuntime<T>

§

impl<T = EventLoopMessage> !RefUnwindSafe for VersoRuntime<T>

§

impl<T = EventLoopMessage> !Send for VersoRuntime<T>

§

impl<T = EventLoopMessage> !Sync for VersoRuntime<T>

§

impl<T> Unpin for VersoRuntime<T>
where T: Unpin,

§

impl<T = EventLoopMessage> !UnwindSafe for VersoRuntime<T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

Source§

impl<T> AutoreleaseSafe for T
where T: ?Sized,

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<W> Runtime for W
where W: Runtime<EventLoopMessage>,