[−]Trait bastion::io::prelude::AgnostikExecutor
This trait represents a generic executor that can spawn a future, spawn a blocking task, and wait for a future to finish.
Required methods
fn spawn<F>(&self, future: F) -> JoinHandle<<F as Future>::Output>ⓘImportant traits for JoinHandle<R>
impl<R> Future for JoinHandle<R> where
R: 'static + Send, type Output = R;
where
F: Future + Send + 'static,
<F as Future>::Output: Send,
<F as Future>::Output: 'static,
Important traits for JoinHandle<R>
impl<R> Future for JoinHandle<R> where
R: 'static + Send, type Output = R;
F: Future + Send + 'static,
<F as Future>::Output: Send,
<F as Future>::Output: 'static,
Spawns an asynchronous task using the underlying executor.
fn spawn_blocking<F, T>(&self, task: F) -> JoinHandle<T>ⓘImportant traits for JoinHandle<R>
impl<R> Future for JoinHandle<R> where
R: 'static + Send, type Output = R;
where
F: FnOnce() -> T + Send + 'static,
T: Send + 'static,
Important traits for JoinHandle<R>
impl<R> Future for JoinHandle<R> where
R: 'static + Send, type Output = R;
F: FnOnce() -> T + Send + 'static,
T: Send + 'static,
Runs the provided closure on a thread, which can execute blocking tasks asynchronously.
fn block_on<F>(&self, future: F) -> <F as Future>::Output where
F: Future + Send + 'static,
<F as Future>::Output: Send,
<F as Future>::Output: 'static,
F: Future + Send + 'static,
<F as Future>::Output: Send,
<F as Future>::Output: 'static,
Blocks until the future has finished.
Implementors
impl AgnostikExecutor for BastionExecutor
fn spawn<F>(&self, future: F) -> JoinHandle<<F as Future>::Output>ⓘImportant traits for JoinHandle<R>
impl<R> Future for JoinHandle<R> where
R: 'static + Send, type Output = R;
where
F: Future + Send + 'static,
<F as Future>::Output: Send,
<F as Future>::Output: 'static,
Important traits for JoinHandle<R>
impl<R> Future for JoinHandle<R> where
R: 'static + Send, type Output = R;
F: Future + Send + 'static,
<F as Future>::Output: Send,
<F as Future>::Output: 'static,
fn spawn_blocking<F, T>(&self, task: F) -> JoinHandle<T>ⓘImportant traits for JoinHandle<R>
impl<R> Future for JoinHandle<R> where
R: 'static + Send, type Output = R;
where
F: FnOnce() -> T + Send + 'static,
T: Send + 'static,
Important traits for JoinHandle<R>
impl<R> Future for JoinHandle<R> where
R: 'static + Send, type Output = R;
F: FnOnce() -> T + Send + 'static,
T: Send + 'static,
fn block_on<F>(&self, future: F) -> <F as Future>::Output where
F: Future + Send + 'static,
<F as Future>::Output: Send,
<F as Future>::Output: 'static,
F: Future + Send + 'static,
<F as Future>::Output: Send,
<F as Future>::Output: 'static,