pub struct Merger { /* private fields */ }
Expand description
Merger struct that can accept merging of additional patches.
Implementations§
Source§impl Merger
impl Merger
Sourcepub fn new<R: Read + Seek>(
terminal_patch: R,
) -> Result<Result<Merger, SummaryPatch>>
pub fn new<R: Read + Seek>( terminal_patch: R, ) -> Result<Result<Merger, SummaryPatch>>
Creates a new Merger from a terminal patch. This should only be called using the patch that generates the output file you want.
§Arguments
terminal_patch
- The terminal patch that will serve as the core set of instructions.
§Returns
If the terminal summary patch has no Copy instructions, a SummaryPatch is returned. If the terminal summary patch has even a single Copy instructions, a Merger is returned.
Sourcepub fn merge<R: Read + Seek>(
self,
predecessor_patch: R,
) -> Result<Result<Merger, SummaryPatch>>
pub fn merge<R: Read + Seek>( self, predecessor_patch: R, ) -> Result<Result<Merger, SummaryPatch>>
Merges a predecessor patch into the terminal patch. This should be called using proper order of patches.
§Arguments
predecessor_patch
- The patch to merge into the current summary patch.
§Returns
If the resulting summary patch has no Copy instructions, a SummaryPatch is returned. If the resulting summary patch has even a single Copy instructions, a Merger is returned.
Sourcepub fn finish(self) -> SummaryPatch
pub fn finish(self) -> SummaryPatch
Finishes the merger and returns the final summary patch ready to be written or applied.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Merger
impl RefUnwindSafe for Merger
impl Send for Merger
impl Sync for Merger
impl Unpin for Merger
impl UnwindSafe for Merger
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