pub struct JsonCodec;Expand description
JSON codec for the HTTP+JSON protocol binding
Implementations§
Trait Implementations§
Source§impl Codec for JsonCodec
impl Codec for JsonCodec
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
Auto Trait Implementations§
impl Freeze for JsonCodec
impl RefUnwindSafe for JsonCodec
impl Send for JsonCodec
impl Sync for JsonCodec
impl Unpin for JsonCodec
impl UnwindSafe for JsonCodec
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