pub struct Plan {
pub action: &'static str,
pub changes: Vec<String>,
pub content: String,
}Expand description
Resolved landing input, including every key a preview would write.
Fields§
§action: &'static strAdded or updated configuration.
changes: Vec<String>Keys whose configured answers differ from the record.
content: StringThe exact authored TOML the apply writes.
Implementations§
Source§impl Plan
impl Plan
Sourcepub fn new(
target: &Path,
params: &Params,
existing: Option<&Config>,
record: Option<&Manifest>,
) -> Result<Self, RkError>
pub fn new( target: &Path, params: &Params, existing: Option<&Config>, record: Option<&Manifest>, ) -> Result<Self, RkError>
Resolve the output without writing it; existing comments survive.
§Errors
Propagates unreadable or invalid configuration.
Sourcepub fn compose(
text: Option<&str>,
params: &Params,
existing: Option<&Config>,
record: Option<&Manifest>,
) -> Result<Self, RkError>
pub fn compose( text: Option<&str>, params: &Params, existing: Option<&Config>, record: Option<&Manifest>, ) -> Result<Self, RkError>
Resolve the output from the existing text already read, so a planner that owns no filesystem can compose it from its observation; existing comments survive.
§Errors
Propagates invalid configuration.
Trait Implementations§
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