pub struct PushOptions<'cb> { /* private fields */ }
Expand description
Options to control the behavior of a git push.
Implementations§
Source§impl<'cb> PushOptions<'cb>
impl<'cb> PushOptions<'cb>
Sourcepub fn new() -> PushOptions<'cb>
pub fn new() -> PushOptions<'cb>
Creates a new blank set of push 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 push 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 push operation.
Sourcepub fn packbuilder_parallelism(&mut self, parallel: u32) -> &mut Self
pub fn packbuilder_parallelism(&mut self, parallel: u32) -> &mut Self
If the transport being used to push to the remote requires the creation of a pack file, this controls the number of worker threads used by the packbuilder when creating that pack file to be sent to the remote.
if set to 0 the packbuilder will auto-detect the number of threads to create, and the default value is 1.
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 push operation.
Sourcepub fn remote_push_options(&mut self, remote_push_options: &[&str]) -> &mut Self
pub fn remote_push_options(&mut self, remote_push_options: &[&str]) -> &mut Self
Set “push options” to deliver to the remote.
Trait Implementations§
Auto Trait Implementations§
impl<'cb> Freeze for PushOptions<'cb>
impl<'cb> !RefUnwindSafe for PushOptions<'cb>
impl<'cb> !Send for PushOptions<'cb>
impl<'cb> !Sync for PushOptions<'cb>
impl<'cb> Unpin for PushOptions<'cb>
impl<'cb> !UnwindSafe for PushOptions<'cb>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more