pub struct Operation {
pub view_id: ViewId,
pub parents: Vec<OperationId>,
pub metadata: OperationMetadata,
}
Expand description
Represents an operation (transaction) on the repo view, just like how a Commit object represents an operation on the tree.
Operations and views are not meant to be exchanged between repos or users; they represent local state and history.
The operation history will almost always be linear. It will only have forks when parallel operations occurred. The parent is determined when the transaction starts. When the transaction commits, a lock will be taken and it will be checked that the current head of the operation graph is unchanged. If the current head has changed, there has been concurrent operation.
Fields§
§view_id: ViewId
§parents: Vec<OperationId>
§metadata: OperationMetadata
Trait Implementations§
source§impl ContentHash for Operation
impl ContentHash for Operation
source§impl PartialEq for Operation
impl PartialEq for Operation
impl Eq for Operation
impl StructuralEq for Operation
impl StructuralPartialEq for Operation
Auto Trait Implementations§
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnwindSafe for Operation
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more