[−][src]Trait pulsar::executor::Executor
Wrapper trait abstracting the Tokio and async-std executors
Required methods
fn spawn(&self, f: Pin<Box<dyn Future<Output = ()> + Send>>) -> Result<(), ()>
fn spawn_blocking<F, Res>(&self, f: F) -> JoinHandle<Res>ⓘImportant traits for JoinHandle<T>
impl<T> Future for JoinHandle<T> type Output = Option<T>;
where
F: FnOnce() -> Res + Send + 'static,
Res: Send + 'static,
Important traits for JoinHandle<T>
impl<T> Future for JoinHandle<T> type Output = Option<T>;
F: FnOnce() -> Res + Send + 'static,
Res: Send + 'static,
fn interval(&self, duration: Duration) -> Interval
fn delay(&self, duration: Duration) -> Delayⓘ
fn kind(&self) -> ExecutorKind
Implementations on Foreign Types
impl<Exe: Executor> Executor for Arc<Exe>
[src]
fn spawn(&self, f: Pin<Box<dyn Future<Output = ()> + Send>>) -> Result<(), ()>
[src]
fn spawn_blocking<F, Res>(&self, f: F) -> JoinHandle<Res>ⓘImportant traits for JoinHandle<T>
impl<T> Future for JoinHandle<T> type Output = Option<T>;
where
F: FnOnce() -> Res + Send + 'static,
Res: Send + 'static,
[src]
Important traits for JoinHandle<T>
impl<T> Future for JoinHandle<T> type Output = Option<T>;
F: FnOnce() -> Res + Send + 'static,
Res: Send + 'static,
fn interval(&self, duration: Duration) -> Interval
[src]
fn delay(&self, duration: Duration) -> Delayⓘ
[src]
fn kind(&self) -> ExecutorKind
[src]
Implementors
impl Executor for AsyncStdExecutor
[src]
fn spawn(&self, f: Pin<Box<dyn Future<Output = ()> + Send>>) -> Result<(), ()>
[src]
fn spawn_blocking<F, Res>(&self, f: F) -> JoinHandle<Res>ⓘImportant traits for JoinHandle<T>
impl<T> Future for JoinHandle<T> type Output = Option<T>;
where
F: FnOnce() -> Res + Send + 'static,
Res: Send + 'static,
[src]
Important traits for JoinHandle<T>
impl<T> Future for JoinHandle<T> type Output = Option<T>;
F: FnOnce() -> Res + Send + 'static,
Res: Send + 'static,
fn interval(&self, duration: Duration) -> Interval
[src]
fn delay(&self, duration: Duration) -> Delayⓘ
[src]
fn kind(&self) -> ExecutorKind
[src]
impl Executor for TokioExecutor
[src]
fn spawn(&self, f: Pin<Box<dyn Future<Output = ()> + Send>>) -> Result<(), ()>
[src]
fn spawn_blocking<F, Res>(&self, f: F) -> JoinHandle<Res>ⓘImportant traits for JoinHandle<T>
impl<T> Future for JoinHandle<T> type Output = Option<T>;
where
F: FnOnce() -> Res + Send + 'static,
Res: Send + 'static,
[src]
Important traits for JoinHandle<T>
impl<T> Future for JoinHandle<T> type Output = Option<T>;
F: FnOnce() -> Res + Send + 'static,
Res: Send + 'static,