pub trait RefManager {
// Required methods
fn list_branches(&self, filter: BranchFilter) -> AppResult<Vec<Branch>>;
fn list_tags(&self) -> AppResult<Vec<Tag>>;
fn create_branch(&self, name: &str, target: &str) -> AppResult<()>;
fn delete_branch(&self, name: &str) -> AppResult<()>;
fn create_tag(
&self,
name: &str,
target: &str,
message: Option<&str>,
) -> AppResult<()>;
fn delete_tag(&self, name: &str) -> AppResult<()>;
}Expand description
Read and manage git references.
Required Methods§
Sourcefn list_branches(&self, filter: BranchFilter) -> AppResult<Vec<Branch>>
fn list_branches(&self, filter: BranchFilter) -> AppResult<Vec<Branch>>
Lists branches matching the requested filter.
Lists tags in the repository.
Sourcefn create_branch(&self, name: &str, target: &str) -> AppResult<()>
fn create_branch(&self, name: &str, target: &str) -> AppResult<()>
Creates a local branch pointing at the given target revision.
Sourcefn delete_branch(&self, name: &str) -> AppResult<()>
fn delete_branch(&self, name: &str) -> AppResult<()>
Deletes a local branch.
Sourcefn create_tag(
&self,
name: &str,
target: &str,
message: Option<&str>,
) -> AppResult<()>
fn create_tag( &self, name: &str, target: &str, message: Option<&str>, ) -> AppResult<()>
Creates a tag pointing at the given target revision.
Some(message) creates an annotated tag (with tagger and the given
message, which may be empty); None creates a lightweight tag (a plain
ref). Both backends must follow this convention.
Sourcefn delete_tag(&self, name: &str) -> AppResult<()>
fn delete_tag(&self, name: &str) -> AppResult<()>
Deletes a tag.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".