Struct git2::RemoteCallbacks [] [src]

pub struct RemoteCallbacks<'a> {
    // some fields omitted
}

A structure to contain the callbacks which are invoked when a repository is being updated or downloaded.

These callbacks are used to manage facilities such as authentication, transfer progress, etc.

Methods

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

fn new() -> RemoteCallbacks<'a>

Creates a new set of empty callbacks

fn credentials<F>(&mut self, cb: F) -> &mut RemoteCallbacks<'a> where F: FnMut(&str, Option<&str>, CredentialType) -> Result<CredError> + 'a

The callback through which to fetch credentials if required.

fn transfer_progress<F>(&mut self, cb: F) -> &mut RemoteCallbacks<'a> where F: FnMut(Progress) -> bool + 'a

The callback through which progress is monitored.

fn sideband_progress<F>(&mut self, cb: F) -> &mut RemoteCallbacks<'a> where F: FnMut(&[u8]) -> bool + 'a

Textual progress from the remote.

Text sent over the progress side-band will be passed to this function (this is the 'counting objects' output.

fn update_tips<F>(&mut self, cb: F) -> &mut RemoteCallbacks<'a> where F: FnMut(&str, Oid, Oid) -> bool + 'a

Each time a reference is updated locally, the callback will be called with information about it.

fn certificate_check<F>(&mut self, cb: F) -> &mut RemoteCallbacks<'a> where F: FnMut(&Cert, &str) -> bool + 'a

If certificate verification fails, then this callback will be invoked to let the caller make the final decision of whether to allow the connection to proceed.