pub struct PushCommand {
pub name: BString,
pub old: ObjectId,
pub new: ObjectId,
}Expand description
One line of the command list: move name from old to new.
Fields§
§name: BStringFull ref name on the remote.
old: ObjectIdWhat the client believes the remote currently has. The remote compares it and rejects on mismatch; this field is the compare-and-swap.
new: ObjectIdWhat it should become. Null means delete.
Implementations§
Source§impl PushCommand
impl PushCommand
Sourcepub fn update(name: impl Into<BString>, old: ObjectId, new: ObjectId) -> Self
pub fn update(name: impl Into<BString>, old: ObjectId, new: ObjectId) -> Self
Move name from old to new.
Sourcepub fn create(name: impl Into<BString>, new: ObjectId) -> Self
pub fn create(name: impl Into<BString>, new: ObjectId) -> Self
Create name at new, with the null oid as <old>.
Trait Implementations§
Source§impl Clone for PushCommand
impl Clone for PushCommand
Source§fn clone(&self) -> PushCommand
fn clone(&self) -> PushCommand
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 moreSource§impl Debug for PushCommand
impl Debug for PushCommand
impl Eq for PushCommand
Source§impl PartialEq for PushCommand
impl PartialEq for PushCommand
impl StructuralPartialEq for PushCommand
Auto Trait Implementations§
impl Freeze for PushCommand
impl RefUnwindSafe for PushCommand
impl Send for PushCommand
impl Sync for PushCommand
impl Unpin for PushCommand
impl UnsafeUnpin for PushCommand
impl UnwindSafe for PushCommand
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