Skip to main content

RemoteManager

Trait RemoteManager 

Source
pub trait RemoteManager {
    // Required methods
    fn list_remotes(&self) -> AppResult<Vec<Remote>>;
    fn fetch(&self, remote: &str, opts: Option<&FetchOptions>) -> AppResult<()>;
    fn push(&self, remote: &str, opts: Option<&PushOptions>) -> AppResult<()>;
    fn tracking_branch(&self, branch: &str) -> AppResult<String>;
}
Expand description

Read and manage git remotes.

Required Methods§

Source

fn list_remotes(&self) -> AppResult<Vec<Remote>>

Lists configured remotes.

Source

fn fetch(&self, remote: &str, opts: Option<&FetchOptions>) -> AppResult<()>

Fetches updates from a remote.

Source

fn push(&self, remote: &str, opts: Option<&PushOptions>) -> AppResult<()>

Pushes refs to a remote.

Source

fn tracking_branch(&self, branch: &str) -> AppResult<String>

Returns the configured upstream tracking branch for a local branch.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§