Struct git2::PushOptions

source ·
pub struct PushOptions<'cb> { /* private fields */ }
Expand description

Options to control the behavior of a git push.

Implementations§

source§

impl<'cb> PushOptions<'cb>

source

pub fn new() -> PushOptions<'cb>

Creates a new blank set of push options

source

pub fn remote_callbacks(&mut self, cbs: RemoteCallbacks<'cb>) -> &mut Self

Set the callbacks to use for the push operation.

source

pub fn proxy_options(&mut self, opts: ProxyOptions<'cb>) -> &mut Self

Set the proxy options to use for the push operation.

source

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.

source

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.

source

pub fn custom_headers(&mut self, custom_headers: &[&str]) -> &mut Self

Set extra headers for this push operation.

Trait Implementations§

source§

impl<'cb> Default for PushOptions<'cb>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

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

Performs the conversion.