pub struct Handle<T> { /* private fields */ }Expand description
A thread-safe handle to a WebView instance. Used to dispatch closures onto its task queue.
Implementations
sourceimpl<T> Handle<T>
impl<T> Handle<T>
sourcepub fn dispatch<F>(&self, f: F) -> WVResultwhere
F: FnOnce(&mut WebView<'_, T>) -> WVResult + Send + 'static,
pub fn dispatch<F>(&self, f: F) -> WVResultwhere
F: FnOnce(&mut WebView<'_, T>) -> WVResult + Send + 'static,
Schedules a closure to be run on the WebView thread.
Errors
Returns Error::Dispatch if the WebView has been dropped.
If the closure returns an Err, it will be returned on the next call to step().
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Handle<T>where
T: RefUnwindSafe,
impl<T> Unpin for Handle<T>where
T: Unpin,
impl<T> UnwindSafe for Handle<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more