pub trait A2aService:
Send
+ Sync
+ 'static {
type SendStreamingMessageStream: Stream<Item = Result<StreamResponse, Status>> + Send + 'static;
type TaskSubscriptionStream: Stream<Item = Result<StreamResponse, Status>> + Send + 'static;
// Required methods
fn send_message<'life0, 'async_trait>(
&'life0 self,
request: Request<SendMessageRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SendMessageResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send_streaming_message<'life0, 'async_trait>(
&'life0 self,
request: Request<SendMessageRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SendStreamingMessageStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_task<'life0, 'async_trait>(
&'life0 self,
request: Request<GetTaskRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Task>, 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<Task>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn task_subscription<'life0, 'async_trait>(
&'life0 self,
request: Request<TaskSubscriptionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::TaskSubscriptionStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn create_task_push_notification_config<'life0, 'async_trait>(
&'life0 self,
request: Request<CreateTaskPushNotificationConfigRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<TaskPushNotificationConfig>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_task_push_notification_config<'life0, 'async_trait>(
&'life0 self,
request: Request<GetTaskPushNotificationConfigRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<TaskPushNotificationConfig>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_task_push_notification_config<'life0, 'async_trait>(
&'life0 self,
request: Request<ListTaskPushNotificationConfigRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ListTaskPushNotificationConfigResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_agent_card<'life0, 'async_trait>(
&'life0 self,
request: Request<GetAgentCardRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<AgentCard>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_task_push_notification_config<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteTaskPushNotificationConfigRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<()>, 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 A2aServiceServer.
Required Associated Types§
Sourcetype SendStreamingMessageStream: Stream<Item = Result<StreamResponse, Status>> + Send + 'static
type SendStreamingMessageStream: Stream<Item = Result<StreamResponse, Status>> + Send + 'static
Server streaming response type for the SendStreamingMessage method.
Sourcetype TaskSubscriptionStream: Stream<Item = Result<StreamResponse, Status>> + Send + 'static
type TaskSubscriptionStream: Stream<Item = Result<StreamResponse, Status>> + Send + 'static
Server streaming response type for the TaskSubscription method.