pub struct ActionPlan { /* private fields */ }Expand description
A validated set of file operations and commands ready for execution.
Plans can only be built through validation constructors. Callers may inspect plans through accessor methods, but cannot construct or mutate planned work directly.
ActionPlan {
context: todo!(),
origin: todo!(),
config_path: None,
files: Vec::new(),
commands: Vec::new(),
};plan.commands = Vec::new();Implementations§
Source§impl ActionPlan
impl ActionPlan
Sourcepub const fn context(&self) -> &Worktree
pub const fn context(&self) -> &Worktree
Returns the runtime context used while building the plan.
Sourcepub const fn origin(&self) -> &PlanOrigin
pub const fn origin(&self) -> &PlanOrigin
Returns the origin of this plan.
Sourcepub fn config_path(&self) -> Option<&Path>
pub fn config_path(&self) -> Option<&Path>
Returns the config file used for this plan, when it came from a manifest.
Sourcepub fn files(&self) -> &[PlannedFileOperation]
pub fn files(&self) -> &[PlannedFileOperation]
Returns the planned file operations.
Sourcepub fn commands(&self) -> &[PlannedCommand]
pub fn commands(&self) -> &[PlannedCommand]
Returns the planned command operations.
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 ==.