pub struct WryWebviewDispatcher<T: UserEvent> { /* private fields */ }
Expand description
The Tauri WebviewDispatch
for Wry
.
Trait Implementations§
Source§impl<T: Clone + UserEvent> Clone for WryWebviewDispatcher<T>
impl<T: Clone + UserEvent> Clone for WryWebviewDispatcher<T>
Source§fn clone(&self) -> WryWebviewDispatcher<T>
fn clone(&self) -> WryWebviewDispatcher<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: UserEvent> WebviewDispatch<T> for WryWebviewDispatcher<T>
impl<T: UserEvent> WebviewDispatch<T> for WryWebviewDispatcher<T>
Source§fn is_devtools_open(&self) -> Result<bool>
fn is_devtools_open(&self) -> Result<bool>
Gets the devtools window’s current open state.
Source§type Runtime = Wry<T>
type Runtime = Wry<T>
The runtime this
WebviewDispatch
runs under.Source§fn run_on_main_thread<F: FnOnce() + Send + 'static>(&self, f: F) -> Result<()>
fn run_on_main_thread<F: FnOnce() + Send + 'static>(&self, f: F) -> Result<()>
Run a task on the main thread.
Source§fn on_webview_event<F: Fn(&WebviewEvent) + Send + 'static>(
&self,
f: F,
) -> WindowEventId
fn on_webview_event<F: Fn(&WebviewEvent) + Send + 'static>( &self, f: F, ) -> WindowEventId
Registers a webview event handler.
Source§fn with_webview<F: FnOnce(Box<dyn Any>) + Send + 'static>(
&self,
f: F,
) -> Result<()>
fn with_webview<F: FnOnce(Box<dyn Any>) + Send + 'static>( &self, f: F, ) -> Result<()>
Runs a closure with the platform webview object as argument.
Source§fn open_devtools(&self)
fn open_devtools(&self)
Open the web inspector which is usually called devtools.
Source§fn close_devtools(&self)
fn close_devtools(&self)
Close the web inspector which is usually called devtools.
Source§fn position(&self) -> Result<PhysicalPosition<i32>>
fn position(&self) -> Result<PhysicalPosition<i32>>
Returns the position of the top-left hand corner of the webviews’s client area relative to the top-left hand corner of the window.
Source§fn size(&self) -> Result<PhysicalSize<u32>>
fn size(&self) -> Result<PhysicalSize<u32>>
Returns the physical size of the webviews’s client area.
Navigate to the given URL.
Source§fn set_auto_resize(&self, auto_resize: bool) -> Result<()>
fn set_auto_resize(&self, auto_resize: bool) -> Result<()>
Sets whether the webview should automatically grow and shrink its size and position when the parent window resizes.
Source§fn eval_script<S: Into<String>>(&self, script: S) -> Result<()>
fn eval_script<S: Into<String>>(&self, script: S) -> Result<()>
Executes javascript on the window this
WindowDispatch
represents.Source§fn clear_all_browsing_data(&self) -> Result<()>
fn clear_all_browsing_data(&self) -> Result<()>
Clear all browsing data for this webview.
Auto Trait Implementations§
impl<T> Freeze for WryWebviewDispatcher<T>
impl<T> !RefUnwindSafe for WryWebviewDispatcher<T>
impl<T> Send for WryWebviewDispatcher<T>
impl<T> Sync for WryWebviewDispatcher<T>
impl<T> Unpin for WryWebviewDispatcher<T>where
T: Unpin,
impl<T> !UnwindSafe for WryWebviewDispatcher<T>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)