Skip to main content

WorkerTaskService

Trait WorkerTaskService 

Source
pub trait WorkerTaskService:
    Send
    + Sync
    + 'static {
    type PollWorkerTaskStream: Stream<Item = Result<PollWorkerTaskResponse, Status>> + Send + 'static;

    // Required method
    fn poll_worker_task<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Streaming<PollWorkerTaskRequest>>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::PollWorkerTaskStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Generated trait containing gRPC methods that should be implemented for use with WorkerTaskServiceServer.

Required Associated Types§

Source

type PollWorkerTaskStream: Stream<Item = Result<PollWorkerTaskResponse, Status>> + Send + 'static

Server streaming response type for the PollWorkerTask method.

Required Methods§

Source

fn poll_worker_task<'life0, 'async_trait>( &'life0 self, request: Request<Streaming<PollWorkerTaskRequest>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::PollWorkerTaskStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Exchanges registration, task, result, and control frames for one Dex task queue.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§