Skip to main content

RefManager

Trait RefManager 

Source
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§

Source

fn list_branches(&self, filter: BranchFilter) -> AppResult<Vec<Branch>>

Lists branches matching the requested filter.

Source

fn list_tags(&self) -> AppResult<Vec<Tag>>

Lists tags in the repository.

Source

fn create_branch(&self, name: &str, target: &str) -> AppResult<()>

Creates a local branch pointing at the given target revision.

Source

fn delete_branch(&self, name: &str) -> AppResult<()>

Deletes a local branch.

Source

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.

Source

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".

Implementors§