pub enum RevisionState {
Present {
value: Vec<u8>,
revision: Revision,
},
Missing {
revision: Revision,
},
}Expand description
The committed state of one logical document key.
Missing is intentionally not represented as Option: a deleted key
retains the LSN of its deletion so optimistic validation can detect ABA.
Variants§
Implementations§
Source§impl RevisionState
impl RevisionState
pub fn present(value: impl Into<Vec<u8>>, revision: Revision) -> Self
pub fn missing(revision: Revision) -> Self
pub const fn revision(&self) -> Revision
pub fn value(&self) -> Option<&[u8]>
pub fn is_missing(&self) -> bool
pub const fn observed(&self) -> ObservedState
Trait Implementations§
Source§impl Clone for RevisionState
impl Clone for RevisionState
Source§impl Debug for RevisionState
impl Debug for RevisionState
impl Eq for RevisionState
Source§impl PartialEq for RevisionState
impl PartialEq for RevisionState
impl StructuralPartialEq for RevisionState
Auto Trait Implementations§
impl Freeze for RevisionState
impl RefUnwindSafe for RevisionState
impl Send for RevisionState
impl Sync for RevisionState
impl Unpin for RevisionState
impl UnsafeUnpin for RevisionState
impl UnwindSafe for RevisionState
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