Skip to main content

Trait tauri::async_runtime::RuntimeHandle

pub trait RuntimeHandle: Debug + Clone + Sync + Sync {
    fn spawn<F: Future>(&self, task: F) -> JoinHandle<F::Output>ⓘ
Notable traits for JoinHandle<T>
impl<T> Future for JoinHandle<T>    type Output = Result<T>;

    where
        F: Future + Send + 'static,
        F::Output: Send + 'static;

    fn block_on<F: Future>(&self, task: F) -> F::Output;
}

Expand description

Runtime handle definition.

Required methods#

fn spawn<F: Future>(&self, task: F) -> JoinHandle<F::Output>ⓘNotable traits for JoinHandle<T>impl<T> Future for JoinHandle<T>type Output = Result<T>; where F: Future + Send + 'static, F::Output: Send + 'static,[src]#

Spawns a future onto the runtime.

fn block_on<F: Future>(&self, task: F) -> F::Output[src]#

Runs a future to completion on runtime.

Implementors#

impl RuntimeHandle for Handle[src]#

fn spawn<F: Future>(&self, task: F) -> JoinHandle<F::Output>ⓘNotable traits for JoinHandle<T>impl<T> Future for JoinHandle<T>type Output = Result<T>; where F: Future + Send + 'static, F::Output: Send + 'static,#

[src]

fn block_on<F: Future>(&self, task: F) -> F::Output#

[src]