pub struct JsonRpcCodec { /* private fields */ }Expand description
JSON-RPC 2.0 codec that wraps A2A operations
This codec implements the JSON-RPC 2.0 protocol binding for A2A. It wraps operations in JSON-RPC request envelopes and unwraps responses.
Implementations§
Source§impl JsonRpcCodec
impl JsonRpcCodec
Trait Implementations§
Source§impl Clone for JsonRpcCodec
impl Clone for JsonRpcCodec
Source§fn clone(&self) -> JsonRpcCodec
fn clone(&self) -> JsonRpcCodec
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 Codec for JsonRpcCodec
impl Codec for JsonRpcCodec
Source§fn encode_request(&self, operation: &A2AOperation) -> Result<Bytes, A2AError>
fn encode_request(&self, operation: &A2AOperation) -> Result<Bytes, A2AError>
Serialize an A2A operation to bytes for transport Read more
Source§fn decode_response(
&self,
body: &[u8],
operation: &A2AOperation,
) -> Result<A2AResponse, A2AError>
fn decode_response( &self, body: &[u8], operation: &A2AOperation, ) -> Result<A2AResponse, A2AError>
Deserialize transport response bytes to an A2A response Read more
Source§fn content_type(&self) -> &str
fn content_type(&self) -> &str
Get the content type for this codec Read more
Source§impl Debug for JsonRpcCodec
impl Debug for JsonRpcCodec
Auto Trait Implementations§
impl Freeze for JsonRpcCodec
impl RefUnwindSafe for JsonRpcCodec
impl Send for JsonRpcCodec
impl Sync for JsonRpcCodec
impl Unpin for JsonRpcCodec
impl UnwindSafe for JsonRpcCodec
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