pub struct SyncManager { /* private fields */ }Expand description
Manager for sync operations
Implementations§
Source§impl SyncManager
impl SyncManager
Sourcepub fn pull(&self, remote_name: &str) -> Result<PullResult, GitError>
pub fn pull(&self, remote_name: &str) -> Result<PullResult, GitError>
Pull grit refs from a remote
Sourcepub fn push(&self, remote_name: &str) -> Result<PushResult, GitError>
pub fn push(&self, remote_name: &str) -> Result<PushResult, GitError>
Push grit refs to a remote
Sourcepub fn push_with_rebase(
&self,
remote_name: &str,
actor_id: &ActorId,
) -> Result<PushResult, GitError>
pub fn push_with_rebase( &self, remote_name: &str, actor_id: &ActorId, ) -> Result<PushResult, GitError>
Push with automatic rebase on conflict
If push is rejected due to non-fast-forward, this will:
- Record local head
- Pull remote changes (which updates local ref)
- Find events that were local-only
- Re-append those events on top of remote head
- Push again
Sourcepub fn sync(
&self,
remote_name: &str,
) -> Result<(PullResult, PushResult), GitError>
pub fn sync( &self, remote_name: &str, ) -> Result<(PullResult, PushResult), GitError>
Sync (pull then push)
Sourcepub fn sync_with_rebase(
&self,
remote_name: &str,
actor_id: &ActorId,
) -> Result<(PullResult, PushResult), GitError>
pub fn sync_with_rebase( &self, remote_name: &str, actor_id: &ActorId, ) -> Result<(PullResult, PushResult), GitError>
Sync with automatic rebase (pull then push with conflict resolution)
Auto Trait Implementations§
impl Freeze for SyncManager
impl RefUnwindSafe for SyncManager
impl Send for SyncManager
impl !Sync for SyncManager
impl Unpin for SyncManager
impl UnwindSafe for SyncManager
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