#[non_exhaustive]pub struct PlanItems {
pub id: PlanId,
pub entries: Vec<PlanEntry>,
pub meta: Option<Map<String, Value>>,
}unstable_protocol_v2 only.Expand description
A plan represented as structured entries.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: PlanIdThe plan ID to update.
entries: Vec<PlanEntry>The list of tasks to be accomplished.
When updating an item-based plan, the agent must send a complete list of all entries with their current status. The client replaces that plan with each update.
meta: Option<Map<String, Value>>The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Implementations§
Source§impl PlanItems
impl PlanItems
Sourcepub fn new(id: impl Into<PlanId>, entries: Vec<PlanEntry>) -> PlanItems
pub fn new(id: impl Into<PlanId>, entries: Vec<PlanEntry>) -> PlanItems
Builds PlanItems with the required fields set; optional fields start unset or empty.
Sourcepub fn meta(self, meta: impl IntoOption<Map<String, Value>>) -> PlanItems
pub fn meta(self, meta: impl IntoOption<Map<String, Value>>) -> PlanItems
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PlanItems
impl<'de> Deserialize<'de> for PlanItems
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PlanItems, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PlanItems, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for PlanItems
Source§impl JsonSchema for PlanItems
impl JsonSchema for PlanItems
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Serialize for PlanItems
impl Serialize for PlanItems
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for PlanItems
Auto Trait Implementations§
impl Freeze for PlanItems
impl RefUnwindSafe for PlanItems
impl Send for PlanItems
impl Sync for PlanItems
impl Unpin for PlanItems
impl UnsafeUnpin for PlanItems
impl UnwindSafe for PlanItems
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.