[−][src]Struct browser_window::ApplicationThreaded
A thread-safe application handle. This handle also allows you to dispatch code to be executed on the GUI thread.
Implementations
impl ApplicationThreaded[src]
pub fn delegate<'a, F, R>(&self, func: F) -> ApplicationDelegateFuture<'a, R> where
F: FnOnce(Application) -> R + Send + 'a,
R: Send, [src]
F: FnOnce(Application) -> R + Send + 'a,
R: Send,
Executes the given closure on the GUI thread, and gives back the result when done. Keep in mind that in multi-threaded environments, it is generally a good idea to use a Box return type, or use something else to put the value on the heap when dealing with large types.
pub fn dispatch<'a, F>(&self, func: F) where
F: FnOnce(Application) + Send + 'a, [src]
F: FnOnce(Application) + Send + 'a,
Executes the given closure on the GUI thread.
pub fn exit(&self, exit_code: i32)[src]
Signals the runtime to exit.
This will cause Runtime::run to stop and return the provided exit code.
Trait Implementations
impl Clone for ApplicationThreaded[src]
fn clone(&self) -> ApplicationThreaded[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for ApplicationThreaded[src]
impl Deref for ApplicationThreaded[src]
type Target = ApplicationHandle
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target[src]
impl Sync for ApplicationThreaded[src]
Auto Trait Implementations
impl RefUnwindSafe for ApplicationThreaded
impl Send for ApplicationThreaded
impl Unpin for ApplicationThreaded
impl UnwindSafe for ApplicationThreaded
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,