[][src]Struct git2::Branch

pub struct Branch<'repo> { /* fields omitted */ }

A structure to represent a git branch

A branch is currently just a wrapper to an underlying Reference. The reference can be accessed through the get and unwrap methods.

Methods

impl<'repo> Branch<'repo>
[src]

Creates Branch type from a Reference

Gain access to the reference that is this branch

Take ownership of the underlying reference.

Delete an existing branch reference.

Determine if the current local branch is pointed at by HEAD.

Move/rename an existing local branch reference.

Return the name of the given local or remote branch.

May return Ok(None) if the name is not valid utf-8.

Return the name of the given local or remote branch.

Return the reference supporting the remote tracking branch, given a local branch reference.

Set the upstream configuration for a given local branch.

If None is specified, then the upstream branch is unset. The name provided is the name of the branch to set as upstream.

Auto Trait Implementations

impl<'repo> !Send for Branch<'repo>

impl<'repo> !Sync for Branch<'repo>

Blanket Implementations

impl<T> From for T
[src]

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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