pub struct GitRefPushOptsBuilder<'a> { /* private fields */ }Expand description
Builder for GitRefPushOpts.
Implementations§
Source§impl<'a> GitRefPushOptsBuilder<'a>
impl<'a> GitRefPushOptsBuilder<'a>
Sourcepub fn branch<VALUE: Into<&'a str>>(&mut self, value: VALUE) -> &mut Self
pub fn branch<VALUE: Into<&'a str>>(&mut self, value: VALUE) -> &mut Self
Destination branch; a refs/ prefix is used verbatim. Defaults to this ref’s branch name. Required for detached and non-branch refs.
Sourcepub fn expected_remote_sha<VALUE: Into<&'a str>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn expected_remote_sha<VALUE: Into<&'a str>>( &mut self, value: VALUE, ) -> &mut Self
Optional lease: a full lowercase object ID allows replacement only if the remote ref still has that value. Checked even for up-to-date pushes. Empty or omitted uses normal non-force rules, creating the ref if it does not exist.
Sourcepub fn remote<VALUE: Into<&'a str>>(&mut self, value: VALUE) -> &mut Self
pub fn remote<VALUE: Into<&'a str>>(&mut self, value: VALUE) -> &mut Self
Name of a registered remote to push to (see GitRepository.withRemote). Defaults to origin. The remote’s push URLs, or its URL, become the destination; more than one push URL requires an explicit to instead.
Sourcepub fn to<VALUE: Into<Id>>(&mut self, value: VALUE) -> &mut Self
pub fn to<VALUE: Into<Id>>(&mut self, value: VALUE) -> &mut Self
Destination remote repository. Defaults to the origin remote’s push routing, or the source’s repository URL when none is registered. Required when the source has no remote URL.
Sourcepub fn build(&self) -> Result<GitRefPushOpts<'a>, GitRefPushOptsBuilderError>
pub fn build(&self) -> Result<GitRefPushOpts<'a>, GitRefPushOptsBuilderError>
Trait Implementations§
Source§impl<'a> Clone for GitRefPushOptsBuilder<'a>
impl<'a> Clone for GitRefPushOptsBuilder<'a>
Source§fn clone(&self) -> GitRefPushOptsBuilder<'a>
fn clone(&self) -> GitRefPushOptsBuilder<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for GitRefPushOptsBuilder<'a>
impl<'a> RefUnwindSafe for GitRefPushOptsBuilder<'a>
impl<'a> Send for GitRefPushOptsBuilder<'a>
impl<'a> Sync for GitRefPushOptsBuilder<'a>
impl<'a> Unpin for GitRefPushOptsBuilder<'a>
impl<'a> UnsafeUnpin for GitRefPushOptsBuilder<'a>
impl<'a> UnwindSafe for GitRefPushOptsBuilder<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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