tauri_runtime_wry

Struct WryHandle

Source
pub struct WryHandle<T: UserEvent> { /* private fields */ }
Expand description

A handle to the Wry runtime.

Implementations§

Source§

impl<T: UserEvent> WryHandle<T>

Source

pub fn create_tao_window<F: FnOnce() -> (String, TaoWindowBuilder) + Send + 'static>( &self, f: F, ) -> Result<Weak<Window>>

Creates a new tao window using a callback, and returns its window id.

Source

pub fn window_id(&self, window_id: TaoWindowId) -> WindowId

Gets the [WebviewId'] associated with the given [WindowId`].

Source

pub fn send_event(&self, message: Message<T>) -> Result<()>

Send a message to the event loop.

Source

pub fn plugin<P: PluginBuilder<T> + 'static>(&mut self, plugin: P)
where <P as PluginBuilder<T>>::Plugin: Send,

Trait Implementations§

Source§

impl<T: Clone + UserEvent> Clone for WryHandle<T>

Source§

fn clone(&self) -> WryHandle<T>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

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

Source§

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

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

impl<T: UserEvent> RuntimeHandle<T> for WryHandle<T>

Source§

type Runtime = Wry<T>

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 request_exit(&self, code: i32) -> Result<()>

Requests an exit of the event loop.
Source§

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

Create a new window.
Source§

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

Create a new webview.
Source§

fn run_on_main_thread<F: FnOnce() + Send + 'static>(&self, f: F) -> Result<()>

Run a task on the main thread.
Source§

fn display_handle(&self) -> Result<DisplayHandle<'_>, HandleError>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<T: UserEvent> Sync for WryHandle<T>

Auto Trait Implementations§

§

impl<T> Freeze for WryHandle<T>

§

impl<T> !RefUnwindSafe for WryHandle<T>

§

impl<T> Send for WryHandle<T>

§

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

§

impl<T> !UnwindSafe for WryHandle<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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

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

Source§

impl<T> MaybeSendSync for T

Source§

impl<T> UserEvent for T
where T: Debug + Clone + Send + 'static,