Struct radicle_surf::vcs::git::RepositoryRef[][src]

pub struct RepositoryRef<'a> { /* fields omitted */ }

A reference-only Repository. This means that we cannot mutate the underlying Repository. Not being able to mutate the Repository means that the functions defined for RepositoryRef should be thread-safe.

Construction

Use the From<&'a git2::Repository> implementation to construct a RepositoryRef.

Implementations

impl<'a> RepositoryRef<'a>[src]

pub fn which_namespace(&self) -> Result<Option<Namespace>, Error>[src]

What is the current namespace we’re browsing in.

pub fn list_branches(
    &self,
    filter: BranchSelector
) -> Result<Vec<Branch>, Error>
[src]

List the branches within a repository, filtering out ones that do not parse correctly.

Errors

pub fn list_tags(&self) -> Result<Vec<Tag>, Error>[src]

List the tags within a repository, filtering out ones that do not parse correctly.

Errors

pub fn list_namespaces(&self) -> Result<Vec<Namespace>, Error>[src]

List the namespaces within a repository, filtering out ones that do not parse correctly.

Errors

pub fn diff(&self, from: Oid, to: Oid) -> Result<Diff, Error>[src]

Get the Diff between two commits.

pub fn initial_diff(&self, oid: Oid) -> Result<Diff, Error>[src]

Get the Diff of a commit with no parents.

pub fn oid(&self, oid: &str) -> Result<Oid, Error>[src]

Parse an Oid from the given string.

Trait Implementations

impl<'a> Debug for RepositoryRef<'a>[src]

impl<'a> From<&'a Repository> for RepositoryRef<'a>[src]

impl<'a> From<&'a Repository> for RepositoryRef<'a>[src]

impl<'a> Send for RepositoryRef<'a>[src]

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

type HistoryId = Rev

The way to identify a History.

type ArtefactId = Oid

The way to identify an artefact.

Auto Trait Implementations

impl<'a> RefUnwindSafe for RepositoryRef<'a>

impl<'a> !Sync for RepositoryRef<'a>

impl<'a> Unpin for RepositoryRef<'a>

impl<'a> UnwindSafe for RepositoryRef<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.