pub trait GitStore: Send + Sync {
// Required methods
fn init_bare<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), GitError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_refs<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<String, Oid>, GitError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn resolve_ref<'life0, 'life1, 'async_trait>(
&'life0 self,
ref_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Oid>, GitError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_ref_cas<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ref_name: &'life1 str,
new_oid: Option<&'life2 Oid>,
expected_old_oid: Option<&'life3 Oid>,
) -> Pin<Box<dyn Future<Output = Result<(), GitError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn read_object<'life0, 'life1, 'async_trait>(
&'life0 self,
oid: &'life1 Oid,
) -> Pin<Box<dyn Future<Output = Result<GitObject, GitError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn write_blob<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Oid, GitError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn object_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
oid: &'life1 Oid,
) -> Pin<Box<dyn Future<Output = Result<bool, GitError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn merge_base<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
a: &'life1 Oid,
b: &'life2 Oid,
) -> Pin<Box<dyn Future<Output = Result<Option<Oid>, GitError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn rev_list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
include: &'life1 [Oid],
exclude: &'life2 [Oid],
) -> Pin<Box<dyn Future<Output = Result<Vec<Oid>, GitError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Storage abstraction over a bare Git repository.
Required Methods§
fn init_bare<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), GitError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_refs<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<String, Oid>, GitError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve_ref<'life0, 'life1, 'async_trait>(
&'life0 self,
ref_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Oid>, GitError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_ref_cas<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ref_name: &'life1 str,
new_oid: Option<&'life2 Oid>,
expected_old_oid: Option<&'life3 Oid>,
) -> Pin<Box<dyn Future<Output = Result<(), GitError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn read_object<'life0, 'life1, 'async_trait>(
&'life0 self,
oid: &'life1 Oid,
) -> Pin<Box<dyn Future<Output = Result<GitObject, GitError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write_blob<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Oid, GitError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn object_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
oid: &'life1 Oid,
) -> Pin<Box<dyn Future<Output = Result<bool, GitError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn merge_base<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
a: &'life1 Oid,
b: &'life2 Oid,
) -> Pin<Box<dyn Future<Output = Result<Option<Oid>, GitError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn rev_list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
include: &'life1 [Oid],
exclude: &'life2 [Oid],
) -> Pin<Box<dyn Future<Output = Result<Vec<Oid>, GitError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".