Skip to main content

DynRuntimeHandle

Struct DynRuntimeHandle 

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

Implementations§

Source§

impl<T: UserEvent> DynRuntimeHandle<T>

Source

pub fn new<H: RuntimeHandle<T>>(handle: H) -> Self

Wraps a runtime handle.

Source

pub fn is<H: RuntimeHandle<T>>(&self) -> bool

Whether the wrapped handle is of type H.

Source

pub fn downcast_ref<H: RuntimeHandle<T>>(&self) -> Option<&H>

Returns a reference to the wrapped handle if it is of type H.

Trait Implementations§

Source§

impl<T: UserEvent> Clone for DynRuntimeHandle<T>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<T: Debug + UserEvent> Debug for DynRuntimeHandle<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 DynRuntimeHandle<T>

Source§

type Runtime = DynRuntime<T>

Source§

fn create_proxy(&self) -> DynEventLoopProxy<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>

Get a handle to the display controller of the windowing system.
Source§

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

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

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

Returns the monitor that contains the given point.
Source§

fn available_monitors(&self) -> Result<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 set_device_event_filter(&self, filter: DeviceEventFilter)

Change the device event filter mode. Read more
Source§

fn custom_scheme_url(&self, scheme: &str, https: bool) -> String

Returns the URL a custom scheme is served from, e.g. tauri://localhost or http://tauri.localhost. Read more
Source§

fn webview_version(&self) -> Result<String>

Returns the version of the underlying webview engine.

Auto Trait Implementations§

§

impl<T> !RefUnwindSafe for DynRuntimeHandle<T>

§

impl<T> !UnwindSafe for DynRuntimeHandle<T>

§

impl<T> Freeze for DynRuntimeHandle<T>
where Arc<dyn ErasedRuntimeHandle<T>>: Freeze,

§

impl<T> Send for DynRuntimeHandle<T>
where Arc<dyn ErasedRuntimeHandle<T>>: Send,

§

impl<T> Sync for DynRuntimeHandle<T>
where Arc<dyn ErasedRuntimeHandle<T>>: Sync,

§

impl<T> Unpin for DynRuntimeHandle<T>
where Arc<dyn ErasedRuntimeHandle<T>>: Unpin,

§

impl<T> UnsafeUnpin for DynRuntimeHandle<T>
where Arc<dyn ErasedRuntimeHandle<T>>: UnsafeUnpin,

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, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 = !

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

fn try_from(value: U) -> Result<T, !>

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> UserEvent for T
where T: Debug + Clone + Send + 'static,