[][src]Struct browser_window::ApplicationThreaded

pub struct ApplicationThreaded { /* fields omitted */ }

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]

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]

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]

impl Copy for ApplicationThreaded[src]

impl Deref for ApplicationThreaded[src]

type Target = ApplicationHandle

The resulting type after dereferencing.

impl Sync for ApplicationThreaded[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.