pub struct GraftPlan {
pub framework: FrameworkId,
pub cuts: Vec<GraftCut>,
}Expand description
A persistent overlay plan. It never moves or edits source files. 持久化覆盖计划;它永不移动或编辑源码文件。
Fields§
§framework: FrameworkIdFramework the plan’s cuts belong to. 本计划各切口所属的框架。
cuts: Vec<GraftCut>The cuts to apply, in the order they were added. 待应用的切口,按加入顺序排列。
Implementations§
Source§impl GraftPlan
impl GraftPlan
Sourcepub fn new(framework: FrameworkId) -> GraftPlan
pub fn new(framework: FrameworkId) -> GraftPlan
An empty plan for one framework. 为某个框架新建的空计划。
Sourcepub fn cut(self, path: impl Into<String>, graft: impl Into<String>) -> GraftPlan
pub fn cut(self, path: impl Into<String>, graft: impl Into<String>) -> GraftPlan
Builder form: append a single-node cut and return the plan. 构建器写法:追加一条单节点切口并返回计划。
Trait Implementations§
impl Eq for GraftPlan
impl StructuralPartialEq for GraftPlan
Auto Trait Implementations§
impl Freeze for GraftPlan
impl RefUnwindSafe for GraftPlan
impl Send for GraftPlan
impl Sync for GraftPlan
impl Unpin for GraftPlan
impl UnsafeUnpin for GraftPlan
impl UnwindSafe for GraftPlan
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