pub struct ForkRequest {
pub plan_id: PlanId,
pub variant: String,
pub edits: Vec<GraphEdit>,
pub project_root: Option<ProjectRoot>,
}Expand description
Request bundle for crate::ports::Planner::fork_plan: copy the head
graph of the named variant plan_id, apply edits, and register the
result as the new draft variant variant of the same plan line.
Fields§
§plan_id: PlanId§variant: String§edits: Vec<GraphEdit>Applied in order with crate::edits::apply_edits.
project_root: Option<ProjectRoot>Where to write the new variant’s plan file. Falls back to the planner’s own root; with neither, the variant is registered inline.
Implementations§
Source§impl ForkRequest
impl ForkRequest
pub fn new(plan_id: PlanId, variant: impl Into<String>) -> Self
Sourcepub fn with_edits(self, edits: Vec<GraphEdit>) -> Self
pub fn with_edits(self, edits: Vec<GraphEdit>) -> Self
Set the edits applied to the copied graph.
Sourcepub fn with_project_root(self, root: ProjectRoot) -> Self
pub fn with_project_root(self, root: ProjectRoot) -> Self
Write the new variant’s file under root.
Trait Implementations§
Source§impl Clone for ForkRequest
impl Clone for ForkRequest
Auto Trait Implementations§
impl Freeze for ForkRequest
impl RefUnwindSafe for ForkRequest
impl Send for ForkRequest
impl Sync for ForkRequest
impl Unpin for ForkRequest
impl UnsafeUnpin for ForkRequest
impl UnwindSafe for ForkRequest
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