Skip to main content

Repository

Trait Repository 

Source
pub trait Repository {
    // Required methods
    fn root(&self) -> &Path;
    fn head(&self) -> AppResult<Reference>;
    fn resolve_ref(&self, refname: &str) -> AppResult<Oid>;
    fn is_dirty(&self) -> AppResult<bool>;
}
Expand description

Core git repository operations.

Required Methods§

Source

fn root(&self) -> &Path

Returns the absolute path to the repository root.

Source

fn head(&self) -> AppResult<Reference>

Returns the reference that HEAD points to.

Source

fn resolve_ref(&self, refname: &str) -> AppResult<Oid>

Resolves a ref name (branch, tag, or SHA prefix) to an OID.

Source

fn is_dirty(&self) -> AppResult<bool>

Reports whether the working tree has uncommitted changes.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§