pub enum Body {
Show 17 variants
Task {
description: String,
input: Value,
deadline_ms: Option<u32>,
priority: Option<u8>,
},
Result {
output: Value,
artifacts: Vec<Artifact>,
},
Text {
text: String,
},
Query {
subject: String,
parameters: Option<Value>,
},
Proposal {
terms: Value,
price: Option<String>,
valid_until: Option<i64>,
},
Ref {
target_msg_id: String,
},
Progress {
target_msg_id: String,
percent: Option<u8>,
note: Option<String>,
},
InputNeeded {
target_msg_id: String,
what: String,
schema: Option<Value>,
},
Failure {
target_msg_id: String,
code: u16,
reason: String,
recoverable: bool,
},
Error {
code: u16,
message: String,
taxonomy: Option<ErrorKind>,
details: Option<Value>,
},
Hello {
agent_card: Option<AgentCard>,
card_hash: Option<String>,
nonce: Vec<u8>,
},
Delegate {
task: Box<Body>,
chain: Vec<String>,
},
Sealed {
sender_pub: Vec<u8>,
salt: Vec<u8>,
ciphertext: Vec<u8>,
},
Cl {
expressions: Vec<ClExpr>,
},
Subscribe {
watch: Box<Matcher>,
until_ms: Option<i64>,
},
Unsubscribe {
target_msg_id: String,
},
KeyRotation {
new_did: String,
valid_from_ms: i64,
reason: Option<String>,
},
}Expand description
Body variants (spec §6).
Variants§
Task
Result
Text
Query
Proposal
Ref
Progress
InputNeeded
Failure
Error
Fields
Hello
Delegate
Sealed
§10.1: encrypted inner envelope (X25519 + ChaCha20-Poly1305)
Cl
§6.2: content-language expressions (shared grammar for facts/actions/queries/commitments). Grammar matrix in cl::well_formed.
Subscribe
§32: ongoing interest — watch a declarative matcher until until_ms.
Unsubscribe
§32: cancel a prior subscription.
KeyRotation
§37: identity rotation — SIGNED BY THE OLD KEY, carries the new did:key. Receivers update their registry; continuity is provable because the rotation itself verifies under the old identity.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Body
impl<'de> Deserialize<'de> for Body
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Body
Auto Trait Implementations§
impl Freeze for Body
impl RefUnwindSafe for Body
impl Send for Body
impl Sync for Body
impl Unpin for Body
impl UnsafeUnpin for Body
impl UnwindSafe for Body
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