[−][src]Struct git2::RemoteCallbacks
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]
pub fn new() -> RemoteCallbacks<'a>
[src]
Creates a new set of empty callbacks
pub fn credentials<F>(&mut self, cb: F) -> &mut RemoteCallbacks<'a> where
F: FnMut(&str, Option<&str>, CredentialType) -> Result<Cred, Error> + 'a,
[src]
F: FnMut(&str, Option<&str>, CredentialType) -> Result<Cred, Error> + 'a,
The callback through which to fetch credentials if required.
pub fn transfer_progress<F>(&mut self, cb: F) -> &mut RemoteCallbacks<'a> where
F: FnMut(Progress) -> bool + 'a,
[src]
F: FnMut(Progress) -> bool + 'a,
The callback through which progress is monitored.
pub fn sideband_progress<F>(&mut self, cb: F) -> &mut RemoteCallbacks<'a> where
F: FnMut(&[u8]) -> bool + 'a,
[src]
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).
pub fn update_tips<F>(&mut self, cb: F) -> &mut RemoteCallbacks<'a> where
F: FnMut(&str, Oid, Oid) -> bool + 'a,
[src]
F: FnMut(&str, Oid, Oid) -> bool + 'a,
Each time a reference is updated locally, the callback will be called with information about it.
pub fn certificate_check<F>(&mut self, cb: F) -> &mut RemoteCallbacks<'a> where
F: FnMut(&Cert, &str) -> bool + 'a,
[src]
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.
pub fn push_update_reference<F>(&mut self, cb: F) -> &mut RemoteCallbacks<'a> where
F: FnMut(&str, Option<&str>) -> Result<(), Error> + 'a,
[src]
F: FnMut(&str, Option<&str>) -> Result<(), Error> + 'a,
Set a callback to get invoked for each updated reference on a push.
The first argument to the callback is the name of the reference and the
second is a status message sent by the server. If the status is Some
then the push was rejected.
Trait Implementations
impl<'a> Default for RemoteCallbacks<'a>
[src]
Auto Trait Implementations
impl<'a> !Send for RemoteCallbacks<'a>
impl<'a> !Sync for RemoteCallbacks<'a>
impl<'a> Unpin for RemoteCallbacks<'a>
impl<'a> !UnwindSafe for RemoteCallbacks<'a>
impl<'a> !RefUnwindSafe for RemoteCallbacks<'a>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,