pub struct HostOperation {
pub id: u64,
pub expected: DocumentVersion,
pub kind: OperationKind,
}Expand description
A single outstanding operation. Check expected immediately before any
mutation, including after async work. Return Rejected on a stale revision.
Fields§
§id: u64Token the host must echo in its acknowledgement.
expected: DocumentVersionDocument identity and revision required immediately before execution.
kind: OperationKindHost work to perform if the document is current.
Implementations§
Source§impl HostOperation
impl HostOperation
Sourcepub fn is_current(&self, version: DocumentVersion) -> bool
pub fn is_current(&self, version: DocumentVersion) -> bool
Check the document identity and revision immediately before applying the operation.
Trait Implementations§
Source§impl Clone for HostOperation
impl Clone for HostOperation
Source§impl Debug for HostOperation
impl Debug for HostOperation
impl Eq for HostOperation
Source§impl PartialEq for HostOperation
impl PartialEq for HostOperation
impl StructuralPartialEq for HostOperation
Auto Trait Implementations§
impl Freeze for HostOperation
impl RefUnwindSafe for HostOperation
impl Send for HostOperation
impl Sync for HostOperation
impl Unpin for HostOperation
impl UnsafeUnpin for HostOperation
impl UnwindSafe for HostOperation
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