pub struct DependencySet {
pub ranges: Vec<(Vec<u8>, Vec<u8>)>,
/* private fields */
}Expand description
Serializable-mode read dependencies recorded against a transaction. Zero-width entries are point reads; otherwise half-open [start,end).
Fields§
§ranges: Vec<(Vec<u8>, Vec<u8>)>Recorded read ranges as (start, end) pairs; a zero-width pair is a
point dependency.
Implementations§
Source§impl DependencySet
impl DependencySet
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Whether no point, range, or whole-keyspace dependency was recorded.
Sourcepub fn record(&mut self, start: Vec<u8>, end: Vec<u8>)
pub fn record(&mut self, start: Vec<u8>, end: Vec<u8>)
Record a half-open [start, end) range dependency.
Sourcepub fn record_prefix(&mut self, prefix: &[u8])
pub fn record_prefix(&mut self, prefix: &[u8])
Prefix tracking is explicit so an empty prefix (all keys) is distinct from a point dependency on the empty key.
Sourcepub fn extend(&mut self, other: Self)
pub fn extend(&mut self, other: Self)
Merge dependencies captured by another preparation phase.
Sourcepub fn intersects_key(&self, key: &[u8]) -> bool
pub fn intersects_key(&self, key: &[u8]) -> bool
Whether key falls in any recorded read range (serializable conflict
probe for transaction commit).
Trait Implementations§
Source§impl Clone for DependencySet
impl Clone for DependencySet
Source§impl Debug for DependencySet
impl Debug for DependencySet
Auto Trait Implementations§
impl Freeze for DependencySet
impl RefUnwindSafe for DependencySet
impl Send for DependencySet
impl Sync for DependencySet
impl Unpin for DependencySet
impl UnsafeUnpin for DependencySet
impl UnwindSafe for DependencySet
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