Trait nuclei::AgnostikExecutor[][src]

pub trait AgnostikExecutor {
    pub fn spawn<F>(&self, future: F) -> JoinHandle<<F as Future>::Output>

Notable 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
;
pub fn spawn_blocking<F, T>(&self, task: F) -> JoinHandle<T>

Notable traits for JoinHandle<R>

impl<R> Future for JoinHandle<R> where
    R: 'static + Send
type Output = R;

    where
        T: Send + 'static,
        F: FnOnce() -> T + Send + 'static
;
pub 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
; }

and wait for a future to finish.

Required methods

pub fn spawn<F>(&self, future: F) -> JoinHandle<<F as Future>::Output>

Notable 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, 
[src]

Spawns an asynchronous task using the underlying executor.

pub fn spawn_blocking<F, T>(&self, task: F) -> JoinHandle<T>

Notable traits for JoinHandle<R>

impl<R> Future for JoinHandle<R> where
    R: 'static + Send
type Output = R;
where
    T: Send + 'static,
    F: FnOnce() -> T + Send + 'static, 
[src]

Runs the provided closure on a thread, which can execute blocking tasks asynchronously.

pub 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, 
[src]

Blocks until the future has finished.

Loading content...

Implementors

impl AgnostikExecutor for BastionExecutor[src]

Loading content...