Trait deno_graph::Executor

source ·
pub trait Executor {
    // Required method
    fn execute(
        &self,
        fut: Pin<Box<dyn Future<Output = ()> + 'static>>
    ) -> Pin<Box<dyn Future<Output = ()> + 'static>>;
}
Expand description

An executor for futures.

This trait allows deno_graph to run background tasks on the async executor.

Required Methods§

source

fn execute( &self, fut: Pin<Box<dyn Future<Output = ()> + 'static>> ) -> Pin<Box<dyn Future<Output = ()> + 'static>>

Spawns a future to run on this executor.

Trait Implementations§

source§

impl<'a> Default for &'a dyn Executor

source§

fn default() -> &'a dyn Executor

Returns the “default value” for a type. Read more

Implementors§