pub struct A2AClient { /* private fields */ }Expand description
A2A Client for interacting with A2A agents
Implementations§
Source§impl A2AClient
impl A2AClient
Sourcepub fn with_token(self, token: impl Into<String>) -> Self
pub fn with_token(self, token: impl Into<String>) -> Self
Set authentication token
Sourcepub async fn get_agent_card(&self) -> Result<AgentCard>
pub async fn get_agent_card(&self) -> Result<AgentCard>
Get the agent card
Sourcepub async fn send_message(&self, params: MessageSendParams) -> Result<Task>
pub async fn send_message(&self, params: MessageSendParams) -> Result<Task>
Send a message to the agent
Sourcepub async fn get_task(
&self,
id: &str,
history_length: Option<usize>,
) -> Result<Task>
pub async fn get_task( &self, id: &str, history_length: Option<usize>, ) -> Result<Task>
Get task status
Sourcepub async fn cancel_task(&self, id: &str) -> Result<Task>
pub async fn cancel_task(&self, id: &str) -> Result<Task>
Cancel a task
Sourcepub async fn call_rpc(&self, request: JsonRpcRequest) -> Result<JsonRpcResponse>
pub async fn call_rpc(&self, request: JsonRpcRequest) -> Result<JsonRpcResponse>
Make a JSON-RPC call
Auto Trait Implementations§
impl Freeze for A2AClient
impl !RefUnwindSafe for A2AClient
impl Send for A2AClient
impl Sync for A2AClient
impl Unpin for A2AClient
impl !UnwindSafe for A2AClient
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more