pub enum RowAddrRemap {
Compact(CompactRowAddrRemap),
Direct(HashMap<u64, Option<u64>>),
}Expand description
A queryable row-address remapping with the exact semantics of
HashMap<u64, Option<u64>>::get(&addr).copied():
None— the address is not affected by this remap (keep it unchanged)Some(None)— the row was deletedSome(Some(addr))— the row moved toaddr
Variants§
Compact(CompactRowAddrRemap)
Compact, O(#fragments) remap built from per-group rewritten-row
bitmaps and new-fragment layouts.
Direct(HashMap<u64, Option<u64>>)
Full materialized old-to-new address map. Uses O(#rows) memory.
Implementations§
Source§impl RowAddrRemap
impl RowAddrRemap
pub fn compact(groups: impl IntoIterator<Item = GroupInput>) -> Result<Self>
Sourcepub fn direct(map: HashMap<u64, Option<u64>>) -> Self
pub fn direct(map: HashMap<u64, Option<u64>>) -> Self
Build a remap from a fully materialized old-to-new address map.
Sourcepub fn get(&self, addr: u64) -> Option<Option<u64>>
pub fn get(&self, addr: u64) -> Option<Option<u64>>
Look up addr. See RowAddrRemap for the tri-state return semantics.
pub fn is_empty(&self) -> bool
pub fn affected_fragments(&self) -> RoaringBitmap
pub fn fully_deleted_fragments(&self) -> Option<RoaringBitmap>
Trait Implementations§
Source§impl Clone for RowAddrRemap
impl Clone for RowAddrRemap
Source§fn clone(&self) -> RowAddrRemap
fn clone(&self) -> RowAddrRemap
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RowAddrRemap
impl RefUnwindSafe for RowAddrRemap
impl Send for RowAddrRemap
impl Sync for RowAddrRemap
impl Unpin for RowAddrRemap
impl UnsafeUnpin for RowAddrRemap
impl UnwindSafe for RowAddrRemap
Blanket Implementations§
impl<T> Allocation for T
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