Skip to main content

Module bridge

Module bridge 

Source
Expand description

Bridge between hand-written serde types (a2a::types) and tonic/prost-generated types (a2a::proto).

This module provides From/conversion functions in both directions so the gRPC layer can speak proto types on the wire while the rest of the codebase works with the ergonomic serde types.

Functionsยง

json_to_prost_struct
Convert a serde_json::Value to a prost_types::Struct.
local_card_to_proto
Convert a local AgentCard to a proto AgentCard.
local_message_to_proto
local_task_status_to_proto
local_task_to_proto
Convert a local Task to a proto Task.
prost_struct_to_json
Convert a prost_types::Struct to a serde_json::Value.
proto_message_to_local
Convert a proto Message to a local Message.
proto_task_to_local
Convert a proto Task to a local Task.