pub struct GitRefPushOpts<'a> {
pub branch: Option<&'a str>,
pub expected_remote_sha: Option<&'a str>,
pub remote: Option<&'a str>,
pub to: Option<Id>,
}Fields§
§branch: Option<&'a str>Destination branch; a refs/ prefix is used verbatim. Defaults to this ref’s branch name. Required for detached and non-branch refs.
expected_remote_sha: Option<&'a str>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.
remote: Option<&'a str>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.
to: Option<Id>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.
Trait Implementations§
Source§impl<'a> Debug for GitRefPushOpts<'a>
impl<'a> Debug for GitRefPushOpts<'a>
Source§impl<'a> PartialEq for GitRefPushOpts<'a>
impl<'a> PartialEq for GitRefPushOpts<'a>
impl<'a> StructuralPartialEq for GitRefPushOpts<'a>
Auto Trait Implementations§
impl<'a> Freeze for GitRefPushOpts<'a>
impl<'a> RefUnwindSafe for GitRefPushOpts<'a>
impl<'a> Send for GitRefPushOpts<'a>
impl<'a> Sync for GitRefPushOpts<'a>
impl<'a> Unpin for GitRefPushOpts<'a>
impl<'a> UnsafeUnpin for GitRefPushOpts<'a>
impl<'a> UnwindSafe for GitRefPushOpts<'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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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