pub struct RefTransactionItem {
pub name: String,
pub new_oid: Option<ObjectId>,
pub expected_old: Option<ObjectId>,
}Expand description
A single ref change in an update_refs batch transaction.
Fields§
§name: StringFull ref name (e.g. refs/heads/main).
new_oid: Option<ObjectId>New value to write, or None to delete the ref.
expected_old: Option<ObjectId>Compare-and-swap expectation. When Some, the ref’s current value must
equal this for the item to apply (an expected_old of an oid that is not
the current value — including when the ref is absent — fails the batch).
When None, the current value is not checked.
Note: this CAS form expects the ref to currently hold expected_old. To
require that a ref be created (must not already exist), leave this
None — callers that need create-only semantics check existence
themselves; matching jj’s transaction model where None means “any”.
Trait Implementations§
Source§impl Clone for RefTransactionItem
impl Clone for RefTransactionItem
Source§impl Debug for RefTransactionItem
impl Debug for RefTransactionItem
impl Eq for RefTransactionItem
Source§impl PartialEq for RefTransactionItem
impl PartialEq for RefTransactionItem
impl StructuralPartialEq for RefTransactionItem
Auto Trait Implementations§
impl Freeze for RefTransactionItem
impl RefUnwindSafe for RefTransactionItem
impl Send for RefTransactionItem
impl Sync for RefTransactionItem
impl Unpin for RefTransactionItem
impl UnsafeUnpin for RefTransactionItem
impl UnwindSafe for RefTransactionItem
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.