pub struct JsonRpcTransport { /* private fields */ }Available on crate feature
client only.Expand description
JSON-RPC 2.0 transport for the A2A protocol.
Handles both synchronous (JSON response) and streaming (SSE) requests.
SSE events are wrapped in JSON-RPC response envelopes by the server,
and this transport unwraps them into protocol Events.
Implementations§
Trait Implementations§
Source§impl Clone for JsonRpcTransport
impl Clone for JsonRpcTransport
Source§fn clone(&self) -> JsonRpcTransport
fn clone(&self) -> JsonRpcTransport
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JsonRpcTransport
impl Debug for JsonRpcTransport
Source§impl Transport for JsonRpcTransport
impl Transport for JsonRpcTransport
Source§fn send_message<'a>(
&'a self,
params: &'a MessageSendParams,
) -> Pin<Box<dyn Future<Output = Result<SendMessageResult>> + Send + 'a>>
fn send_message<'a>( &'a self, params: &'a MessageSendParams, ) -> Pin<Box<dyn Future<Output = Result<SendMessageResult>> + Send + 'a>>
Sends a message (non-streaming). Corresponds to
message/send.Source§fn send_message_stream<'a>(
&'a self,
params: &'a MessageSendParams,
) -> Pin<Box<dyn Future<Output = Result<EventStream>> + Send + 'a>>
fn send_message_stream<'a>( &'a self, params: &'a MessageSendParams, ) -> Pin<Box<dyn Future<Output = Result<EventStream>> + Send + 'a>>
Sends a message with streaming response. Corresponds to
message/stream.Source§fn get_task<'a>(
&'a self,
params: &'a TaskQueryParams,
) -> Pin<Box<dyn Future<Output = Result<Task>> + Send + 'a>>
fn get_task<'a>( &'a self, params: &'a TaskQueryParams, ) -> Pin<Box<dyn Future<Output = Result<Task>> + Send + 'a>>
Retrieves a task. Corresponds to
tasks/get.Source§fn list_tasks<'a>(
&'a self,
params: &'a ListTasksRequest,
) -> Pin<Box<dyn Future<Output = Result<ListTasksResponse>> + Send + 'a>>
fn list_tasks<'a>( &'a self, params: &'a ListTasksRequest, ) -> Pin<Box<dyn Future<Output = Result<ListTasksResponse>> + Send + 'a>>
Lists tasks. Corresponds to
tasks/list.Source§fn cancel_task<'a>(
&'a self,
params: &'a TaskIdParams,
) -> Pin<Box<dyn Future<Output = Result<Task>> + Send + 'a>>
fn cancel_task<'a>( &'a self, params: &'a TaskIdParams, ) -> Pin<Box<dyn Future<Output = Result<Task>> + Send + 'a>>
Cancels a task. Corresponds to
tasks/cancel.Source§fn resubscribe<'a>(
&'a self,
params: &'a TaskIdParams,
) -> Pin<Box<dyn Future<Output = Result<EventStream>> + Send + 'a>>
fn resubscribe<'a>( &'a self, params: &'a TaskIdParams, ) -> Pin<Box<dyn Future<Output = Result<EventStream>> + Send + 'a>>
Resubscribes to a task’s event stream. Corresponds to
tasks/resubscribe.Source§fn set_task_push_config<'a>(
&'a self,
params: &'a TaskPushConfig,
) -> Pin<Box<dyn Future<Output = Result<TaskPushConfig>> + Send + 'a>>
fn set_task_push_config<'a>( &'a self, params: &'a TaskPushConfig, ) -> Pin<Box<dyn Future<Output = Result<TaskPushConfig>> + Send + 'a>>
Sets push notification config for a task.
Source§fn get_task_push_config<'a>(
&'a self,
params: &'a GetTaskPushConfigParams,
) -> Pin<Box<dyn Future<Output = Result<TaskPushConfig>> + Send + 'a>>
fn get_task_push_config<'a>( &'a self, params: &'a GetTaskPushConfigParams, ) -> Pin<Box<dyn Future<Output = Result<TaskPushConfig>> + Send + 'a>>
Gets push notification config for a task.
Source§fn list_task_push_config<'a>(
&'a self,
params: &'a ListTaskPushConfigParams,
) -> Pin<Box<dyn Future<Output = Result<Vec<TaskPushConfig>>> + Send + 'a>>
fn list_task_push_config<'a>( &'a self, params: &'a ListTaskPushConfigParams, ) -> Pin<Box<dyn Future<Output = Result<Vec<TaskPushConfig>>> + Send + 'a>>
Lists push notification configs for a task.
Source§fn delete_task_push_config<'a>(
&'a self,
params: &'a DeleteTaskPushConfigParams,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
fn delete_task_push_config<'a>( &'a self, params: &'a DeleteTaskPushConfigParams, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
Deletes push notification config for a task.
Auto Trait Implementations§
impl Freeze for JsonRpcTransport
impl !RefUnwindSafe for JsonRpcTransport
impl Send for JsonRpcTransport
impl Sync for JsonRpcTransport
impl Unpin for JsonRpcTransport
impl UnsafeUnpin for JsonRpcTransport
impl !UnwindSafe for JsonRpcTransport
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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