pub trait TaskService:
Send
+ Sync
+ 'static {
type CreateTaskStream: Stream<Item = Result<TaskInfoResponse, Status>> + Send + 'static;
type ExecuteStream: Stream<Item = Result<GetDataResponse, Status>> + Send + 'static;
// Required methods
fn create_task<'life0, 'async_trait>(
&'life0 self,
request: Request<CreateTaskRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::CreateTaskStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn cancel_task<'life0, 'async_trait>(
&'life0 self,
request: Request<CancelTaskRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CancelTaskResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn execute<'life0, 'async_trait>(
&'life0 self,
request: Request<ExecuteRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::ExecuteStream>, 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 TaskServiceServer.
Required Associated Types§
sourcetype CreateTaskStream: Stream<Item = Result<TaskInfoResponse, Status>> + Send + 'static
type CreateTaskStream: Stream<Item = Result<TaskInfoResponse, Status>> + Send + 'static
Server streaming response type for the CreateTask method.
sourcetype ExecuteStream: Stream<Item = Result<GetDataResponse, Status>> + Send + 'static
type ExecuteStream: Stream<Item = Result<GetDataResponse, Status>> + Send + 'static
Server streaming response type for the Execute method.
Required Methods§
fn create_task<'life0, 'async_trait>(
&'life0 self,
request: Request<CreateTaskRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::CreateTaskStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
sourcefn cancel_task<'life0, 'async_trait>(
&'life0 self,
request: Request<CancelTaskRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CancelTaskResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn cancel_task<'life0, 'async_trait>(
&'life0 self,
request: Request<CancelTaskRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CancelTaskResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Cancel an already-died (self execution-failure, previous aborted, completed) task will still succeed.