pub trait GitBackend: Send + Sync {
// Required methods
fn clone_repo<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
url: &'life1 str,
local_path: &'life2 Path,
shallow: bool,
) -> Pin<Box<dyn Future<Output = Result<(), SyncError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn pull<'life0, 'life1, 'async_trait>(
&'life0 self,
local_path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<(), SyncError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn push<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
local_path: &'life1 Path,
message: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), SyncError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn is_cloned(&self, local_path: &Path) -> bool;
}Expand description
Trait for Git-like backends that store and retrieve credential snapshots.
Implement this trait to provide a custom storage backend (e.g. GitLab, a custom Git server, or even a non-Git store).
Required Methods§
Sourcefn clone_repo<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
url: &'life1 str,
local_path: &'life2 Path,
shallow: bool,
) -> Pin<Box<dyn Future<Output = Result<(), SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn clone_repo<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
url: &'life1 str,
local_path: &'life2 Path,
shallow: bool,
) -> Pin<Box<dyn Future<Output = Result<(), SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Clone the repository (shallow if supported) to local_path.
Sourcefn pull<'life0, 'life1, 'async_trait>(
&'life0 self,
local_path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<(), SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn pull<'life0, 'life1, 'async_trait>(
&'life0 self,
local_path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<(), SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Pull latest changes from remote.
Sourcefn push<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
local_path: &'life1 Path,
message: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn push<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
local_path: &'life1 Path,
message: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), SyncError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Stage, commit, and push local changes.