pub struct HttpA2AClient { /* private fields */ }Expand description
HTTP-based implementation of the A2A client protocol.
Uses reqwest to make real HTTP calls to remote agents’ A2A endpoints.
Implementations§
Source§impl HttpA2AClient
impl HttpA2AClient
Sourcepub fn new() -> PunchResult<Self>
pub fn new() -> PunchResult<Self>
Create a new HTTP A2A client with the default 30-second timeout.
Sourcepub fn with_timeout(timeout: Duration) -> PunchResult<Self>
pub fn with_timeout(timeout: Duration) -> PunchResult<Self>
Create a new HTTP A2A client with a custom timeout.
Trait Implementations§
Source§impl A2AClient for HttpA2AClient
impl A2AClient for HttpA2AClient
Source§fn discover<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = PunchResult<AgentCard>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn discover<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = PunchResult<AgentCard>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch a remote agent’s card from its well-known URL.
Source§fn send_task<'life0, 'life1, 'async_trait>(
&'life0 self,
agent: &'life1 AgentCard,
task: A2ATask,
) -> Pin<Box<dyn Future<Output = PunchResult<A2ATask>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send_task<'life0, 'life1, 'async_trait>(
&'life0 self,
agent: &'life1 AgentCard,
task: A2ATask,
) -> Pin<Box<dyn Future<Output = PunchResult<A2ATask>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send a task to a remote agent via HTTP POST.
Source§fn get_task_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
agent: &'life1 AgentCard,
task_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = PunchResult<A2ATaskStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_task_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
agent: &'life1 AgentCard,
task_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = PunchResult<A2ATaskStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get the status of a task on a remote agent via HTTP GET.
Source§fn cancel_task<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
agent: &'life1 AgentCard,
task_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = PunchResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn cancel_task<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
agent: &'life1 AgentCard,
task_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = PunchResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Cancel a task on a remote agent via HTTP POST.
Auto Trait Implementations§
impl Freeze for HttpA2AClient
impl !RefUnwindSafe for HttpA2AClient
impl Send for HttpA2AClient
impl Sync for HttpA2AClient
impl Unpin for HttpA2AClient
impl UnsafeUnpin for HttpA2AClient
impl !UnwindSafe for HttpA2AClient
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