Struct git2::FetchOptions
source · [−]pub struct FetchOptions<'cb> { /* private fields */ }
Expand description
Options which can be specified to various fetch operations.
Implementations
sourceimpl<'cb> FetchOptions<'cb>
impl<'cb> FetchOptions<'cb>
sourcepub fn new() -> FetchOptions<'cb>
pub fn new() -> FetchOptions<'cb>
Creates a new blank set of fetch options
sourcepub fn remote_callbacks(&mut self, cbs: RemoteCallbacks<'cb>) -> &mut Self
pub fn remote_callbacks(&mut self, cbs: RemoteCallbacks<'cb>) -> &mut Self
Set the callbacks to use for the fetch operation.
sourcepub fn proxy_options(&mut self, opts: ProxyOptions<'cb>) -> &mut Self
pub fn proxy_options(&mut self, opts: ProxyOptions<'cb>) -> &mut Self
Set the proxy options to use for the fetch operation.
sourcepub fn prune(&mut self, prune: FetchPrune) -> &mut Self
pub fn prune(&mut self, prune: FetchPrune) -> &mut Self
Set whether to perform a prune after the fetch.
sourcepub fn update_fetchhead(&mut self, update: bool) -> &mut Self
pub fn update_fetchhead(&mut self, update: bool) -> &mut Self
Set whether to write the results to FETCH_HEAD.
Defaults to true
.
Set how to behave regarding tags on the remote, such as auto-downloading tags for objects we’re downloading or downloading all of them.
The default is to auto-follow tags.
sourcepub fn follow_redirects(&mut self, redirect: RemoteRedirect) -> &mut Self
pub fn follow_redirects(&mut self, redirect: RemoteRedirect) -> &mut Self
Set remote redirection settings; whether redirects to another host are permitted.
By default, git will follow a redirect on the initial request
(/info/refs
), but not subsequent requests.
sourcepub fn custom_headers(&mut self, custom_headers: &[&str]) -> &mut Self
pub fn custom_headers(&mut self, custom_headers: &[&str]) -> &mut Self
Set extra headers for this fetch operation.
Trait Implementations
Auto Trait Implementations
impl<'cb> !RefUnwindSafe for FetchOptions<'cb>
impl<'cb> !Send for FetchOptions<'cb>
impl<'cb> !Sync for FetchOptions<'cb>
impl<'cb> Unpin for FetchOptions<'cb>
impl<'cb> !UnwindSafe for FetchOptions<'cb>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more