pub enum SpliceOutcome {
Identical,
Replaced(String),
Appended(String),
FreshWrite(String),
}Expand description
Outcome of splice_managed_section — describes how the install layer
should reconcile the new body against the existing file contents.
Variants§
Identical
Existing file contains the delimited block and its inner body matches the new body byte-for-byte. No write needed.
Replaced(String)
Existing file contains the delimited block but the inner body differs. The carried string is the full new file contents — only the delimited region was rewritten; everything outside is byte-preserved.
Appended(String)
Existing file has no delimited block. The carried string is the existing contents (with a separating newline if non-empty) plus a freshly-appended delimited block.
FreshWrite(String)
Existing file does not exist. The carried string is the bare delimited block.
Trait Implementations§
Source§impl Debug for SpliceOutcome
impl Debug for SpliceOutcome
impl Eq for SpliceOutcome
Source§impl PartialEq for SpliceOutcome
impl PartialEq for SpliceOutcome
Source§fn eq(&self, other: &SpliceOutcome) -> bool
fn eq(&self, other: &SpliceOutcome) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SpliceOutcome
Auto Trait Implementations§
impl Freeze for SpliceOutcome
impl RefUnwindSafe for SpliceOutcome
impl Send for SpliceOutcome
impl Sync for SpliceOutcome
impl Unpin for SpliceOutcome
impl UnsafeUnpin for SpliceOutcome
impl UnwindSafe for SpliceOutcome
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