pub struct ApplicationHandle { /* private fields */ }
Expand description
A thread-unsafe application handle. Often provided by for Browser Window.
Implementations§
Source§impl ApplicationHandle
impl ApplicationHandle
Returns an instance of a CookieJar
, if the underlying browser
framework supports it. Currently, only CEF supports cookies.
Sourcepub fn exit(&self, exit_code: i32)
pub fn exit(&self, exit_code: i32)
Causes the Runtime
to terminate.
The Runtime
’s Runtime::run
or spawn command will return the exit
code provided. This will mean that not all tasks might complete.
If you were awaiting
Sourcepub fn into_threaded(self) -> ApplicationHandleThreaded
pub fn into_threaded(self) -> ApplicationHandleThreaded
Note: Only available with feature threadsafe
enabled.
Transforms this application handle into a thread-safe version of it.
Sourcepub fn spawn<F>(&self, future: F)
pub fn spawn<F>(&self, future: F)
Spawns the given future, executing it on the GUI thread somewhere in the near future.
Sourcepub fn dispatch_delayed<'a, F>(&self, func: F, delay: Duration) -> boolwhere
F: FnOnce(&ApplicationHandle) + 'a,
pub fn dispatch_delayed<'a, F>(&self, func: F, delay: Duration) -> boolwhere
F: FnOnce(&ApplicationHandle) + 'a,
Queues the given closure func
to be executed on the GUI thread
somewhere in the future, at least after the given delay. The closure
will only execute when and if the runtime is still running.
Returns whether or not the closure will be able to execute.
Trait Implementations§
Source§impl Clone for ApplicationHandle
impl Clone for ApplicationHandle
Source§fn clone(&self) -> ApplicationHandle
fn clone(&self) -> ApplicationHandle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more