Struct sled_overlay::tree::SledTreeOverlayState
source · pub struct SledTreeOverlayState {
pub cache: BTreeMap<IVec, IVec>,
pub removed: BTreeSet<IVec>,
}Expand description
Struct representing SledTreeOverlay cache state
Fields§
§cache: BTreeMap<IVec, IVec>The cache is the actual overlayed data represented as a BTreeMap.
removed: BTreeSet<IVec>In removed, we keep track of keys that were removed in the overlay.
Implementations§
source§impl SledTreeOverlayState
impl SledTreeOverlayState
sourcepub fn new() -> Self
pub fn new() -> Self
Instantiate a new SledTreeOverlayState.
sourcepub fn aggregate(&self) -> Option<Batch>
pub fn aggregate(&self) -> Option<Batch>
Aggregate all the current tree overlay state changes into
a sled::Batch ready for further operation.
If there are no changes, return None.
sourcepub fn remove_diff(&mut self, other: &Self)
pub fn remove_diff(&mut self, other: &Self)
Remove provided tree overlay state changes from our own.
Trait Implementations§
source§impl Clone for SledTreeOverlayState
impl Clone for SledTreeOverlayState
source§fn clone(&self) -> SledTreeOverlayState
fn clone(&self) -> SledTreeOverlayState
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for SledTreeOverlayState
impl Debug for SledTreeOverlayState
source§impl Default for SledTreeOverlayState
impl Default for SledTreeOverlayState
source§impl PartialEq for SledTreeOverlayState
impl PartialEq for SledTreeOverlayState
source§fn eq(&self, other: &SledTreeOverlayState) -> bool
fn eq(&self, other: &SledTreeOverlayState) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for SledTreeOverlayState
Auto Trait Implementations§
impl Freeze for SledTreeOverlayState
impl RefUnwindSafe for SledTreeOverlayState
impl Send for SledTreeOverlayState
impl Sync for SledTreeOverlayState
impl Unpin for SledTreeOverlayState
impl UnwindSafe for SledTreeOverlayState
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