pub struct ActionPlan {
pub context: Worktree,
pub origin: PlanOrigin,
pub config_path: Option<PathBuf>,
pub files: Vec<PlannedFileOperation>,
pub commands: Vec<PlannedCommand>,
}Expand description
A validated set of file operations and commands ready for execution.
Fields§
§context: WorktreeRuntime context used while building the plan.
origin: PlanOriginOrigin of this plan.
config_path: Option<PathBuf>Config file used for this plan, when it came from a manifest.
files: Vec<PlannedFileOperation>Planned file operations.
commands: Vec<PlannedCommand>Planned command operations.
Implementations§
Source§impl ActionPlan
impl ActionPlan
Sourcepub fn from_manifest(
path: &Path,
manifest: &Config,
context: &Worktree,
options: ActionPlanOptions,
) -> Result<Self>
pub fn from_manifest( path: &Path, manifest: &Config, context: &Worktree, options: ActionPlanOptions, ) -> Result<Self>
Builds a validated action plan from a parsed treeboot manifest.
This does not apply file operations or execute commands. It normalizes paths that may not exist yet, rejects invalid declarative behavior, and marks optional missing-source file operations as skipped.
§Errors
Returns an error if manifest validation fails.
Sourcepub fn from_file_operations(
context: &Worktree,
origin: PlanOrigin,
files: &[FileOperation],
options: ActionPlanOptions,
) -> Result<Self>
pub fn from_file_operations( context: &Worktree, origin: PlanOrigin, files: &[FileOperation], options: ActionPlanOptions, ) -> Result<Self>
Builds a validated action plan from explicit file operations.
This is intended for manual commands and other callers that already have a discovered worktree context and operation list.
§Errors
Returns an error if file operation validation fails.
Trait Implementations§
Source§impl Clone for ActionPlan
impl Clone for ActionPlan
Source§fn clone(&self) -> ActionPlan
fn clone(&self) -> ActionPlan
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ActionPlan
impl Debug for ActionPlan
impl Eq for ActionPlan
Source§impl PartialEq for ActionPlan
impl PartialEq for ActionPlan
Source§fn eq(&self, other: &ActionPlan) -> bool
fn eq(&self, other: &ActionPlan) -> bool
self and other values to be equal, and is used by ==.