Skip to main content

CliGitStore

Struct CliGitStore 

Source
pub struct CliGitStore { /* private fields */ }
Expand description

Git CLI backed implementation of GitStore operating on a bare repository directory without shell interpolation.

Implementations§

Source§

impl CliGitStore

Source

pub fn new(repo_dir: impl Into<PathBuf>) -> Self

Source

pub fn repo_dir(&self) -> &Path

Source

pub async fn init_bare_at( repo_dir: impl Into<PathBuf>, ) -> Result<Self, GitError>

Initialises a bare repository at repo_dir and returns a store handle pointing to it.

Trait Implementations§

Source§

impl Clone for CliGitStore

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CliGitStore

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl GitStore for CliGitStore

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Auto Trait Implementations§

§

impl Forget for CliGitStore

§

impl Freeze for CliGitStore
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze,

§

impl Move for CliGitStore

§

impl RefUnwindSafe for CliGitStore

§

impl Send for CliGitStore
where RawVecInner: Send,

§

impl Sync for CliGitStore
where RawVecInner: Sync,

§

impl Unpin for CliGitStore
where *const u8 is !null: Unpin,

§

impl UnsafeUnpin for CliGitStore

§

impl UnwindSafe for CliGitStore
where RawVecInner: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.