Struct browser_window::application::ApplicationHandle
source · 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