pub struct Patcher { /* private fields */ }Expand description
Orchestrates hashline patch application against a real filesystem.
Implementations§
Source§impl Patcher
impl Patcher
Sourcepub fn new(fs: Arc<dyn HashlineFs>, snapshots: Arc<dyn SnapshotStore>) -> Self
pub fn new(fs: Arc<dyn HashlineFs>, snapshots: Arc<dyn SnapshotStore>) -> Self
Create a patcher with the given filesystem and snapshot store.
Sourcepub async fn apply(
&self,
patch: &Patch,
) -> Result<PatcherApplyResult, HashlineError>
pub async fn apply( &self, patch: &Patch, ) -> Result<PatcherApplyResult, HashlineError>
Apply a patch: prepare all sections, then commit all (all-or-nothing).
Auto Trait Implementations§
impl !RefUnwindSafe for Patcher
impl !UnwindSafe for Patcher
impl Freeze for Patcher
impl Send for Patcher
impl Sync for Patcher
impl Unpin for Patcher
impl UnsafeUnpin for Patcher
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