Trait radicle_surf::vcs::Vcs[][src]

pub trait Vcs<A, Error> {
    type HistoryId;
    type ArtefactId;
    fn get_history(
        &self,
        identifier: Self::HistoryId
    ) -> Result<History<A>, Error>;
fn get_histories(&self) -> Result<Vec<History<A>>, Error>;
fn get_identifier(artefact: &A) -> Self::ArtefactId; }
Expand description

The VCS trait encapsulates the minimal amount of information for interacting with some notion of History from a given Version-Control-System.

Associated Types

type HistoryId[src]

The way to identify a History.

type ArtefactId[src]

The way to identify an artefact.

Required methods

fn get_history(&self, identifier: Self::HistoryId) -> Result<History<A>, Error>[src]

Find a History in a Repo given a way to identify it

fn get_histories(&self) -> Result<Vec<History<A>>, Error>[src]

Find all histories in a Repo

fn get_identifier(artefact: &A) -> Self::ArtefactId[src]

Identify artefacts of a Repository

Implementors

impl<'a> Vcs<Commit, Error> for RepositoryRef<'a>[src]

type HistoryId = Rev

type ArtefactId = Oid

fn get_history(&self, history_id: Self::HistoryId) -> Result<History, Error>[src]

fn get_histories(&self) -> Result<Vec<History>, Error>[src]

fn get_identifier(artifact: &Commit) -> Self::ArtefactId[src]

impl<Repo, A, Error> Vcs<A, Error> for Browser<Repo, A, Error> where
    Repo: Vcs<A, Error>, 
[src]

type HistoryId = Repo::HistoryId

type ArtefactId = Repo::ArtefactId

fn get_history(&self, identifier: Self::HistoryId) -> Result<History<A>, Error>[src]

fn get_histories(&self) -> Result<Vec<History<A>>, Error>[src]

fn get_identifier(artifact: &A) -> Self::ArtefactId[src]