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 add_diff(&mut self, diff: &SledTreeOverlayStateDiff)
pub fn add_diff(&mut self, diff: &SledTreeOverlayStateDiff)
Add provided tree overlay state changes to our own.
Sourcepub fn remove_diff(&mut self, diff: &SledTreeOverlayStateDiff)
pub fn remove_diff(&mut self, diff: &SledTreeOverlayStateDiff)
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 duplicate 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§fn default() -> SledTreeOverlayState
fn default() -> SledTreeOverlayState
Returns the “default value” for a type. Read more
Source§impl From<&SledTreeOverlayStateDiff> for SledTreeOverlayState
impl From<&SledTreeOverlayStateDiff> for SledTreeOverlayState
Source§fn from(diff: &SledTreeOverlayStateDiff) -> Self
fn from(diff: &SledTreeOverlayStateDiff) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SledTreeOverlayState
impl PartialEq for SledTreeOverlayState
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