pub struct RepositorySynchronizer { /* private fields */ }
Expand description
Main synchronizer struct
Implementations§
Source§impl RepositorySynchronizer
impl RepositorySynchronizer
Sourcepub fn new(repo_path: impl AsRef<Path>, config: SyncConfig) -> Result<Self>
pub fn new(repo_path: impl AsRef<Path>, config: SyncConfig) -> Result<Self>
Create a new synchronizer for the given repository path
Sourcepub fn new_with_detected_branch(
repo_path: impl AsRef<Path>,
config: SyncConfig,
) -> Result<Self>
pub fn new_with_detected_branch( repo_path: impl AsRef<Path>, config: SyncConfig, ) -> Result<Self>
Create a new synchronizer with auto-detected branch name
Sourcepub fn get_repository_state(&self) -> Result<RepositoryState>
pub fn get_repository_state(&self) -> Result<RepositoryState>
Get the current repository state
Sourcepub fn has_local_changes(&self) -> Result<bool>
pub fn has_local_changes(&self) -> Result<bool>
Check if there are local changes that need to be committed
Sourcepub fn check_unhandled_files(&self) -> Result<Option<UnhandledFileState>>
pub fn check_unhandled_files(&self) -> Result<Option<UnhandledFileState>>
Check if there are unhandled file states that should prevent sync
Sourcepub fn get_current_branch(&self) -> Result<String>
pub fn get_current_branch(&self) -> Result<String>
Get the current branch name
Sourcepub fn get_sync_state(&self) -> Result<SyncState>
pub fn get_sync_state(&self) -> Result<SyncState>
Get the sync state relative to the remote
Sourcepub fn auto_commit(&self) -> Result<()>
pub fn auto_commit(&self) -> Result<()>
Auto-commit local changes
Sourcepub fn fast_forward_merge(&self) -> Result<()>
pub fn fast_forward_merge(&self) -> Result<()>
Perform a fast-forward merge
Auto Trait Implementations§
impl Freeze for RepositorySynchronizer
impl RefUnwindSafe for RepositorySynchronizer
impl Send for RepositorySynchronizer
impl !Sync for RepositorySynchronizer
impl Unpin for RepositorySynchronizer
impl UnwindSafe for RepositorySynchronizer
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