pub struct A2AClient<T: Transport> { /* private fields */ }Expand description
High-level A2A client wrapping a transport with middleware.
Implementations§
Source§impl<T: Transport> A2AClient<T>
impl<T: Transport> A2AClient<T>
pub fn new(transport: T) -> Self
pub fn with_interceptors( self, interceptors: Vec<Arc<dyn CallInterceptor>>, ) -> Self
pub async fn send_message( &self, req: &SendMessageRequest, ) -> Result<SendMessageResponse, A2AError>
pub async fn send_streaming_message( &self, req: &SendMessageRequest, ) -> Result<BoxStream<'static, Result<StreamResponse, A2AError>>, A2AError>
pub async fn get_task(&self, req: &GetTaskRequest) -> Result<Task, A2AError>
pub async fn list_tasks( &self, req: &ListTasksRequest, ) -> Result<ListTasksResponse, A2AError>
pub async fn cancel_task( &self, req: &CancelTaskRequest, ) -> Result<Task, A2AError>
pub async fn subscribe_to_task( &self, req: &SubscribeToTaskRequest, ) -> Result<BoxStream<'static, Result<StreamResponse, A2AError>>, A2AError>
pub async fn create_push_config( &self, req: &TaskPushNotificationConfig, ) -> Result<TaskPushNotificationConfig, A2AError>
pub async fn get_push_config( &self, req: &GetTaskPushNotificationConfigRequest, ) -> Result<TaskPushNotificationConfig, A2AError>
pub async fn list_push_configs( &self, req: &ListTaskPushNotificationConfigsRequest, ) -> Result<ListTaskPushNotificationConfigsResponse, A2AError>
pub async fn delete_push_config( &self, req: &DeleteTaskPushNotificationConfigRequest, ) -> Result<(), A2AError>
pub async fn get_extended_agent_card( &self, req: &GetExtendedAgentCardRequest, ) -> Result<AgentCard, A2AError>
pub async fn destroy(&self) -> Result<(), A2AError>
Trait Implementations§
Source§impl<T: Transport> SendMessageExt for A2AClient<T>
impl<T: Transport> SendMessageExt for A2AClient<T>
Auto Trait Implementations§
impl<T> Freeze for A2AClient<T>where
T: Freeze,
impl<T> !RefUnwindSafe for A2AClient<T>
impl<T> Send for A2AClient<T>
impl<T> Sync for A2AClient<T>
impl<T> Unpin for A2AClient<T>where
T: Unpin,
impl<T> UnsafeUnpin for A2AClient<T>where
T: UnsafeUnpin,
impl<T> !UnwindSafe for A2AClient<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request