[][src]Struct browser_window::Runtime

pub struct Runtime { /* fields omitted */ }

Use this to start and run the application with.

Implementations

impl Runtime[src]

pub fn app(&self) -> Application[src]

Obtains an application handle for this runtime.

pub fn app_threaded(&self) -> ApplicationThreaded[src]

Obtains an thread-safe application handle for this runtime.

pub fn run<H>(&self, on_ready: H) -> i32 where
    H: FnOnce(ApplicationThreaded), 
[src]

Run the main loop. This is useful if you want to manipulate the GUI from other threads.

Arguments

  • on_ready - This closure will be called when the runtime has initialized, and will provide an application handle.

pub fn spawn<F>(&self, future: F) -> i32 where
    F: Future<Output = ()> + 'static, 
[src]

Runs the main loop and executes the given future within that loop. Use this when you are fine with running Browser Window single-threaded.

pub fn start() -> Self[src]

Starts the GUI application. Only call this once, and at the start of your application, before anything else is done. Everything that runs before this function, runs as well on the other (browser engine related) processes. That is generally unnecessary.

Auto Trait Implementations

impl RefUnwindSafe for Runtime

impl Send for Runtime

impl !Sync for Runtime

impl Unpin for Runtime

impl UnwindSafe for Runtime

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, 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.