pub struct SyncEngine { /* private fields */ }Expand description
Main sync engine
Implementations§
Source§impl SyncEngine
impl SyncEngine
Sourcepub fn new(config: Config, direction: SyncDirection) -> Result<Self>
pub fn new(config: Config, direction: SyncDirection) -> Result<Self>
Sourcepub fn sync_with_approver(
&self,
source_root: &Path,
dest_root: &Path,
approver: Option<ApprovalCallback>,
) -> Result<SyncResult>
pub fn sync_with_approver( &self, source_root: &Path, dest_root: &Path, approver: Option<ApprovalCallback>, ) -> Result<SyncResult>
Execute the sync operation with an optional approval callback
The approver callback is called before executing each action. It should return Ok(true) to proceed, Ok(false) to skip, or Err to abort.
§Errors
Returns an error if sync fails or approver returns an error.
Auto Trait Implementations§
impl Freeze for SyncEngine
impl RefUnwindSafe for SyncEngine
impl Send for SyncEngine
impl Sync for SyncEngine
impl Unpin for SyncEngine
impl UnwindSafe for SyncEngine
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