Struct git2::RemoteConnection[][src]

pub struct RemoteConnection<'repo, 'connection, 'cb> { /* fields omitted */ }
Expand description

Holds callbacks for a connection to a Remote. Disconnects when dropped

Implementations

impl<'repo, 'connection, 'cb> RemoteConnection<'repo, 'connection, 'cb>[src]

pub fn connected(&mut self) -> bool[src]

Check whether the remote is (still) connected

pub fn list(&self) -> Result<&[RemoteHead<'_>], Error>[src]

Get the remote repository’s reference advertisement list.

This list is available as soon as the connection to the remote is initiated and it remains available after disconnecting.

pub fn default_branch(&self) -> Result<Buf, Error>[src]

Get the remote’s default branch.

This default branch is available as soon as the connection to the remote is initiated and it remains available after disconnecting.

pub fn remote(&mut self) -> &mut Remote<'repo>[src]

access remote bound to this connection

Trait Implementations

impl<'repo, 'connection, 'cb> Drop for RemoteConnection<'repo, 'connection, 'cb>[src]

fn drop(&mut self)[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

impl<'repo, 'connection, 'cb> !RefUnwindSafe for RemoteConnection<'repo, 'connection, 'cb>

impl<'repo, 'connection, 'cb> !Send for RemoteConnection<'repo, 'connection, 'cb>

impl<'repo, 'connection, 'cb> !Sync for RemoteConnection<'repo, 'connection, 'cb>

impl<'repo, 'connection, 'cb> Unpin for RemoteConnection<'repo, 'connection, 'cb> where
    'repo: 'connection, 

impl<'repo, 'connection, 'cb> !UnwindSafe for RemoteConnection<'repo, 'connection, 'cb>

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.