pub struct PushRefSpec {
pub src: Option<ObjectId>,
pub dst: String,
pub force: bool,
pub delete: bool,
pub expected_old: Option<ObjectId>,
pub expect_absent: bool,
}Expand description
A single ref update requested by a push.
Fields§
§src: Option<ObjectId>The source object to push (None for a deletion).
dst: StringThe destination ref on the remote (e.g. refs/heads/main).
force: boolWhether a non-fast-forward update is allowed.
delete: boolWhether this update deletes the remote ref.
expected_old: Option<ObjectId>Compare-and-swap expectation: the remote ref’s current value must match
this (force-with-lease). None disables the value check.
expect_absent: boolForce-with-lease expectation that the remote ref does not currently
exist. When true, a push whose destination already exists on the remote
is rejected as stale (used for “create only” pushes whose lease is the
ref’s absence). Independent of Self::expected_old.
Trait Implementations§
Source§impl Clone for PushRefSpec
impl Clone for PushRefSpec
Source§fn clone(&self) -> PushRefSpec
fn clone(&self) -> PushRefSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PushRefSpec
impl RefUnwindSafe for PushRefSpec
impl Send for PushRefSpec
impl Sync for PushRefSpec
impl Unpin for PushRefSpec
impl UnsafeUnpin for PushRefSpec
impl UnwindSafe for PushRefSpec
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