pub struct A2aMcpCodec;Expand description
The codec that turns SendMessage ↔ tools/call into the bridge’s
canonical envelopes.
Cheap to construct (no allocations beyond the struct itself), safe
to share behind an Arc — the trait’s Send + Sync bound is
satisfied without any interior mutability, because the codec is a
pure function of its inputs.
Implementations§
Source§impl A2aMcpCodec
impl A2aMcpCodec
Trait Implementations§
Source§impl Clone for A2aMcpCodec
impl Clone for A2aMcpCodec
impl Copy for A2aMcpCodec
Source§impl CrossProtocolCodec for A2aMcpCodec
impl CrossProtocolCodec for A2aMcpCodec
Source§fn downstream_protocol(&self) -> ProtocolSide
fn downstream_protocol(&self) -> ProtocolSide
The protocol this codec expects the downstream leg to speak.
Source§fn encode_request(
&self,
downstream_side: ProtocolSide,
ir_method: &str,
raw_envelope: &Map<String, Value>,
report: &mut RequestCodecReport,
) -> Result<Map<String, Value>, CrossProtocolError>
fn encode_request( &self, downstream_side: ProtocolSide, ir_method: &str, raw_envelope: &Map<String, Value>, report: &mut RequestCodecReport, ) -> Result<Map<String, Value>, CrossProtocolError>
Translates a downstream request envelope into the upstream’s wire form. Read more
Source§fn decode_reply(
&self,
downstream_side: ProtocolSide,
ir_method: &str,
reply: &Map<String, Value>,
report: &mut RequestCodecReport,
) -> Result<Map<String, Value>, CrossProtocolError>
fn decode_reply( &self, downstream_side: ProtocolSide, ir_method: &str, reply: &Map<String, Value>, report: &mut RequestCodecReport, ) -> Result<Map<String, Value>, CrossProtocolError>
Translates an upstream reply envelope back into the downstream’s
wire form. Read more
Source§impl Debug for A2aMcpCodec
impl Debug for A2aMcpCodec
Auto Trait Implementations§
impl Freeze for A2aMcpCodec
impl RefUnwindSafe for A2aMcpCodec
impl Send for A2aMcpCodec
impl Sync for A2aMcpCodec
impl Unpin for A2aMcpCodec
impl UnsafeUnpin for A2aMcpCodec
impl UnwindSafe for A2aMcpCodec
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