Struct gitbrowse::Repo [−][src]
A reference to an opened repository.
Implementations
impl Repo
[src]
pub fn open(path: impl AsRef<Path>) -> Result<Repo, Error>
[src]
Open the repository at the given path
pub fn browse_branch<'a>(&'a self, branch: &str) -> Result<Branch<'a>, Error>
[src]
Browse a branch with the given name. Will return an error if the branch is not found.
pub fn current_branch(&self) -> Result<Option<Branch<'_>>, Error>
[src]
Attempt to get the current branch. This will return None
if the current git HEAD
is detached.
pub fn list_branches_with_newest_commit_id(
&self
) -> Result<Vec<NameWithId>, Error>
[src]
&self
) -> Result<Vec<NameWithId>, Error>
List all branches and the ID of the last commit of that branch.
pub fn list_branches(&self) -> Result<Vec<String>, Error>
[src]
List all branches.
pub fn list_tags_with_commit_id(&self) -> Result<Vec<NameWithId>, Error>
[src]
List all tags and the commit ID of that tag.
pub fn list_tags(&self) -> Result<Vec<String>, Error>
[src]
List all tags.
Auto Trait Implementations
impl RefUnwindSafe for Repo
impl Send for Repo
impl !Sync for Repo
impl Unpin for Repo
impl UnwindSafe for Repo
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,