Skip to main content

Executor

Trait Executor 

Source
pub trait Executor:
    Send
    + Sync
    + 'static {
    // Required method
    fn execute<'life0, 'async_trait>(
        &'life0 self,
        payload: Bytes,
    ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Sends a serialized payload to a PHP worker and returns the response.

Plugins call this; they never see the worker pool directly.

Required Methods§

Source

fn execute<'life0, 'async_trait>( &'life0 self, payload: Bytes, ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Send payload to a worker and return the response bytes.

Implementations on Foreign Types§

Source§

impl<T: Executor + ?Sized> Executor for Arc<T>

Blanket impl: an Arc<dyn Executor> is also an Executor.

Source§

fn execute<'life0, 'async_trait>( &'life0 self, payload: Bytes, ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§