pub struct GitBackend { /* private fields */ }Expand description
Git backend for OmniFuse.
Implements the Backend trait: init -> clone/fetch, sync -> commit+push,
refresh -> fetch+safe pull.
Implementations§
Trait Implementations§
Source§impl Backend for GitBackend
impl Backend for GitBackend
Source§async fn init(&self, local_dir: &Path) -> Result<InitResult>
async fn init(&self, local_dir: &Path) -> Result<InitResult>
Initialization: prepare the local directory. Read more
Source§async fn sync(&self, dirty_files: &[PathBuf]) -> Result<SyncResult>
async fn sync(&self, dirty_files: &[PathBuf]) -> Result<SyncResult>
Synchronize local changes with remote. Read more
Source§async fn refresh_remote(
&self,
request: RemoteRefresh<'_>,
) -> Result<RemoteRefreshResult>
async fn refresh_remote( &self, request: RemoteRefresh<'_>, ) -> Result<RemoteRefreshResult>
Detect and safely apply remote changes.
Source§fn should_track(&self, path: &Path) -> bool
fn should_track(&self, path: &Path) -> bool
Should this file be synchronized with remote? Read more
Source§fn poll_interval(&self) -> Duration
fn poll_interval(&self) -> Duration
Interval for polling remote for changes.
Source§fn classify_error(&self, error: &Error) -> ErrorKind
fn classify_error(&self, error: &Error) -> ErrorKind
Classify backend-specific error into shared taxonomy.
Auto Trait Implementations§
impl !Freeze for GitBackend
impl !RefUnwindSafe for GitBackend
impl Send for GitBackend
impl Sync for GitBackend
impl Unpin for GitBackend
impl UnsafeUnpin for GitBackend
impl !UnwindSafe for GitBackend
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more