Struct Task
pub struct Task {
pub id: String,
pub context_id: String,
pub status: TaskStatus,
pub artifacts: Vec<Artifact>,
pub history: Vec<Message>,
pub metadata: Option<Value>,
}Expand description
A2A Task (proto message Task) — returned by SendMessage /
GetTask / CancelTask. Fields beyond the spec-required id/status
are optional and tolerate absence: a peer that omits contextId or
artifacts still parses.
Fields§
§id: StringSpec-REQUIRED: no #[serde(default)] — a Task without id is
rejected at deserialization (proto field_behavior = REQUIRED).
An empty id ("") is also rejected.
context_id: String§status: TaskStatusSpec-REQUIRED: no #[serde(default)] — a Task without status is
rejected at deserialization.
artifacts: Vec<Artifact>§history: Vec<Message>§metadata: Option<Value>Trait Implementations§
Source§impl<'de> Deserialize<'de> for Task
impl<'de> Deserialize<'de> for Task
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for Task
impl JsonSchema for Task
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for Task
Auto Trait Implementations§
impl Freeze for Task
impl RefUnwindSafe for Task
impl Send for Task
impl Sync for Task
impl Unpin for Task
impl UnsafeUnpin for Task
impl UnwindSafe for Task
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