[][src]Struct mhgit::Status

pub struct Status {
    pub changed: Vec<Entry>,
    pub renamed: Vec<Entry>,
    pub untracked: Vec<String>,
    pub ignored: Vec<String>,
    // some fields omitted
}

Git status data.

use mhgit::Repository;

fn main() {
    let status = Repository::new().status().unwrap();
}

Fields

changed: Vec<Entry>

Changed entries

renamed: Vec<Entry>

Renamed/copied entries

untracked: Vec<String>

Untracked filenames

ignored: Vec<String>

Ignored filenames

Implementations

impl Status[src]

pub fn new() -> Status[src]

Return an empty status.

pub fn branch_oid(&self) -> &str[src]

Object id (oid) of current commit.

pub fn branch_head(&self) -> &str[src]

Head of current branch.

pub fn upstream_branch(&self) -> Option<&str>[src]

Upstream branch, if set

pub fn upstream_behind(&self) -> Option<u32>[src]

Number of commits upstream is behind.

pub fn upstream_ahead(&self) -> Option<u32>[src]

Number of commits upstream is ahead.

Trait Implementations

impl Clone for Status[src]

impl Debug for Status[src]

impl Default for Status[src]

impl Eq for Status[src]

impl Hash for Status[src]

impl PartialEq<Status> for Status[src]

impl StructuralEq for Status[src]

impl StructuralPartialEq for Status[src]

impl<'_> TryFrom<&'_ str> for Status[src]

type Error = Error

The type returned in the event of a conversion error.

fn try_from(txt: &str) -> Result<Status, Self::Error>[src]

Parse captured output text from git status

Auto Trait Implementations

impl RefUnwindSafe for Status

impl Send for Status

impl Sync for Status

impl Unpin for Status

impl UnwindSafe for Status

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> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.