pub trait A2aRequestHandlerExt: A2aRequestHandler {
// Required methods
fn send_message<'a>(
&'a self,
request: SendMessageRequest,
context: &'a A2aRequestContext,
) -> Pin<Box<dyn Future<Output = Result<SendMessageResponse, A2aError>> + Send + 'a>>;
fn get_task<'a>(
&'a self,
request: GetTaskRequest,
context: &'a A2aRequestContext,
) -> Pin<Box<dyn Future<Output = Result<GetTaskResponse, A2aError>> + Send + 'a>>;
fn cancel_task<'a>(
&'a self,
request: CancelTaskRequest,
context: &'a A2aRequestContext,
) -> Pin<Box<dyn Future<Output = Result<CancelTaskResponse, A2aError>> + Send + 'a>>;
fn list_tasks<'a>(
&'a self,
request: ListTasksRequest,
context: &'a A2aRequestContext,
) -> Pin<Box<dyn Future<Output = Result<ListTasksResponse, A2aError>> + Send + 'a>>;
fn get_extended_agent_card<'a>(
&'a self,
request: GetExtendedAgentCardRequest,
context: &'a A2aRequestContext,
) -> Pin<Box<dyn Future<Output = Result<GetExtendedAgentCardResponse, A2aError>> + Send + 'a>>;
fn create_task_push_notification_config<'a>(
&'a self,
request: CreateTaskPushNotificationConfigRequest,
context: &'a A2aRequestContext,
) -> Pin<Box<dyn Future<Output = Result<CreateTaskPushNotificationConfigResponse, A2aError>> + Send + 'a>>;
fn get_task_push_notification_config<'a>(
&'a self,
request: GetTaskPushNotificationConfigRequest,
context: &'a A2aRequestContext,
) -> Pin<Box<dyn Future<Output = Result<GetTaskPushNotificationConfigResponse, A2aError>> + Send + 'a>>;
fn list_task_push_notification_configs<'a>(
&'a self,
request: ListTaskPushNotificationConfigsRequest,
context: &'a A2aRequestContext,
) -> Pin<Box<dyn Future<Output = Result<ListTaskPushNotificationConfigsResponse, A2aError>> + Send + 'a>>;
fn delete_task_push_notification_config<'a>(
&'a self,
request: DeleteTaskPushNotificationConfigRequest,
context: &'a A2aRequestContext,
) -> Pin<Box<dyn Future<Output = Result<DeleteTaskPushNotificationConfigResponse, A2aError>> + Send + 'a>>;
}Expand description
The per-method typed wrappers. A blanket
impl means every A2aRequestHandler
gets the typed methods for free.
Required Methods§
Sourcefn send_message<'a>(
&'a self,
request: SendMessageRequest,
context: &'a A2aRequestContext,
) -> Pin<Box<dyn Future<Output = Result<SendMessageResponse, A2aError>> + Send + 'a>>
fn send_message<'a>( &'a self, request: SendMessageRequest, context: &'a A2aRequestContext, ) -> Pin<Box<dyn Future<Output = Result<SendMessageResponse, A2aError>> + Send + 'a>>
Sends a message. Typed counterpart to
dispatch(SendMessage, ...).
Sourcefn get_task<'a>(
&'a self,
request: GetTaskRequest,
context: &'a A2aRequestContext,
) -> Pin<Box<dyn Future<Output = Result<GetTaskResponse, A2aError>> + Send + 'a>>
fn get_task<'a>( &'a self, request: GetTaskRequest, context: &'a A2aRequestContext, ) -> Pin<Box<dyn Future<Output = Result<GetTaskResponse, A2aError>> + Send + 'a>>
Fetches a task. Typed counterpart to
dispatch(GetTask, ...).
Sourcefn cancel_task<'a>(
&'a self,
request: CancelTaskRequest,
context: &'a A2aRequestContext,
) -> Pin<Box<dyn Future<Output = Result<CancelTaskResponse, A2aError>> + Send + 'a>>
fn cancel_task<'a>( &'a self, request: CancelTaskRequest, context: &'a A2aRequestContext, ) -> Pin<Box<dyn Future<Output = Result<CancelTaskResponse, A2aError>> + Send + 'a>>
Cancels a task. Typed counterpart to
dispatch(CancelTask, ...).
Sourcefn list_tasks<'a>(
&'a self,
request: ListTasksRequest,
context: &'a A2aRequestContext,
) -> Pin<Box<dyn Future<Output = Result<ListTasksResponse, A2aError>> + Send + 'a>>
fn list_tasks<'a>( &'a self, request: ListTasksRequest, context: &'a A2aRequestContext, ) -> Pin<Box<dyn Future<Output = Result<ListTasksResponse, A2aError>> + Send + 'a>>
Lists tasks. Typed counterpart to
dispatch(ListTasks, ...).
Sourcefn get_extended_agent_card<'a>(
&'a self,
request: GetExtendedAgentCardRequest,
context: &'a A2aRequestContext,
) -> Pin<Box<dyn Future<Output = Result<GetExtendedAgentCardResponse, A2aError>> + Send + 'a>>
fn get_extended_agent_card<'a>( &'a self, request: GetExtendedAgentCardRequest, context: &'a A2aRequestContext, ) -> Pin<Box<dyn Future<Output = Result<GetExtendedAgentCardResponse, A2aError>> + Send + 'a>>
Fetches the extended agent card. Typed
counterpart to
dispatch(GetExtendedAgentCard, ...).
Sourcefn create_task_push_notification_config<'a>(
&'a self,
request: CreateTaskPushNotificationConfigRequest,
context: &'a A2aRequestContext,
) -> Pin<Box<dyn Future<Output = Result<CreateTaskPushNotificationConfigResponse, A2aError>> + Send + 'a>>
fn create_task_push_notification_config<'a>( &'a self, request: CreateTaskPushNotificationConfigRequest, context: &'a A2aRequestContext, ) -> Pin<Box<dyn Future<Output = Result<CreateTaskPushNotificationConfigResponse, A2aError>> + Send + 'a>>
Creates a push-notification config.
Typed counterpart to
dispatch(CreateTaskPushNotificationConfig, ...).
Sourcefn get_task_push_notification_config<'a>(
&'a self,
request: GetTaskPushNotificationConfigRequest,
context: &'a A2aRequestContext,
) -> Pin<Box<dyn Future<Output = Result<GetTaskPushNotificationConfigResponse, A2aError>> + Send + 'a>>
fn get_task_push_notification_config<'a>( &'a self, request: GetTaskPushNotificationConfigRequest, context: &'a A2aRequestContext, ) -> Pin<Box<dyn Future<Output = Result<GetTaskPushNotificationConfigResponse, A2aError>> + Send + 'a>>
Fetches a push-notification config.
Typed counterpart to
dispatch(GetTaskPushNotificationConfig, ...).
Sourcefn list_task_push_notification_configs<'a>(
&'a self,
request: ListTaskPushNotificationConfigsRequest,
context: &'a A2aRequestContext,
) -> Pin<Box<dyn Future<Output = Result<ListTaskPushNotificationConfigsResponse, A2aError>> + Send + 'a>>
fn list_task_push_notification_configs<'a>( &'a self, request: ListTaskPushNotificationConfigsRequest, context: &'a A2aRequestContext, ) -> Pin<Box<dyn Future<Output = Result<ListTaskPushNotificationConfigsResponse, A2aError>> + Send + 'a>>
Lists push-notification configs.
Typed counterpart to
dispatch(ListTaskPushNotificationConfigs, ...).
Sourcefn delete_task_push_notification_config<'a>(
&'a self,
request: DeleteTaskPushNotificationConfigRequest,
context: &'a A2aRequestContext,
) -> Pin<Box<dyn Future<Output = Result<DeleteTaskPushNotificationConfigResponse, A2aError>> + Send + 'a>>
fn delete_task_push_notification_config<'a>( &'a self, request: DeleteTaskPushNotificationConfigRequest, context: &'a A2aRequestContext, ) -> Pin<Box<dyn Future<Output = Result<DeleteTaskPushNotificationConfigResponse, A2aError>> + Send + 'a>>
Deletes a push-notification config.
Typed counterpart to
dispatch(DeleteTaskPushNotificationConfig, ...).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".