pub struct Plan {
pub version: u64,
pub planner_v: String,
pub effects: Vec<Effect>,
pub opset: PlanOpset,
pub preconditions: Preconditions,
pub new_ids: Vec<NewId>,
pub plan_id: String,
pub diagnostics: Vec<String>,
pub preview: Option<PlanPreview>,
}Expand description
§11.4 Plan.
Fields§
§version: u64§planner_v: String§effects: Vec<Effect>The effects with their targets resolved; $new.<n> kept symbolic;
dropped duplicates excluded.
opset: PlanOpset§preconditions: Preconditions§new_ids: Vec<NewId>§plan_id: String§diagnostics: Vec<String>§preview: Option<PlanPreview>Implementations§
Source§impl Plan
impl Plan
Sourcepub fn core_json(&self) -> Value
pub fn core_json(&self) -> Value
The executable core the digest covers: { version, planner_v, effects, opset, preconditions, new_ids }.
Sourcepub fn to_json(&self, with_preview: bool) -> Value
pub fn to_json(&self, with_preview: bool) -> Value
The wire form; preview only when present and with_preview.
Sourcepub fn from_json(v: &Value) -> Result<Plan, String>
pub fn from_json(v: &Value) -> Result<Plan, String>
Parse a well-formed plan (version must already be 1: use
Plan::admit for a client’s object).
Sourcepub fn admit(v: &Value) -> Result<Plan, Admission>
pub fn admit(v: &Value) -> Result<Plan, Admission>
§11.7 admission of a client’s plan object, in this order: version
≠ 1 → unsupported_plan_version (before any other member is read);
a missing or mistyped core member → invalid; the recomputed digest
≠ plan_id → plan_mismatch { expected, actual }.
Trait Implementations§
impl StructuralPartialEq for Plan
Auto Trait Implementations§
impl Freeze for Plan
impl RefUnwindSafe for Plan
impl Send for Plan
impl Sync for Plan
impl Unpin for Plan
impl UnsafeUnpin for Plan
impl UnwindSafe for Plan
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