pub enum A2aMethod {
SendMessage,
SendStreamingMessage,
GetTask,
ListTasks,
CancelTask,
SubscribeToTask,
CreateTaskPushNotificationConfig,
GetTaskPushNotificationConfig,
ListTaskPushNotificationConfigs,
DeleteTaskPushNotificationConfig,
GetExtendedAgentCard,
}Expand description
Every method A2A defines, as of v1.0.
One variant per method, so an unknown name cannot be confused with a known
one at the type level: lookup returning None is the only way to reach
-32601.
A2A has no notifications at v1.0; every method is a request a peer
answers. The wire surface is request-only.
Variants§
SendMessage
SendMessage — send a message to an agent.
SendStreamingMessage
SendStreamingMessage — streaming version of SendMessage.
GetTask
GetTask — get the latest state of a task.
ListTasks
ListTasks — list tasks with optional filtering and pagination.
CancelTask
CancelTask — cancel a task in progress.
SubscribeToTask
SubscribeToTask — subscribe to task updates for a non-terminal task.
CreateTaskPushNotificationConfig
CreateTaskPushNotificationConfig — register a push notification
config for a task. The webhook URL on this config is the SSRF
surface T27’s push-notification follow-up has to filter.
GetTaskPushNotificationConfig
GetTaskPushNotificationConfig — fetch a push notification config.
ListTaskPushNotificationConfigs
ListTaskPushNotificationConfigs — list push notification configs.
DeleteTaskPushNotificationConfig
DeleteTaskPushNotificationConfig — remove a push notification
config.
GetExtendedAgentCard
GetExtendedAgentCard — fetch the authenticated extended agent card.
Implementations§
Source§impl A2aMethod
impl A2aMethod
Sourcepub const ALL: [Self; 11]
pub const ALL: [Self; 11]
Every method, in the order the specification introduces them.
Exists so a test can assert the direction a per-name test cannot: that
every variant is reachable from a name, not merely that every name
has a variant. A method added to the enum and forgotten in lookup
is otherwise a -32601 waiting to happen.
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
The wire name of this method, as the v1.0 specification defines it.
PascalCase to match the proto file and the gRPC service. The
0.2.x / 0.3.x slash-separated form (message/send, tasks/get) is
not reachable from this method, by design — the bridge (T28) is
where the form mismatch is resolved.