pub struct Memtable { /* private fields */ }Expand description
The memtable serves as an intermediary, ephemeral, sorted storage for new items
When the Memtable exceeds some size, it should be flushed to a table.
Implementations§
Source§impl Memtable
impl Memtable
Sourcepub fn id(&self) -> MemtableId
pub fn id(&self) -> MemtableId
Returns the memtable ID.
Sourcepub fn is_flagged_for_rotation(&self) -> bool
pub fn is_flagged_for_rotation(&self) -> bool
Returns true if the memtable was already flagged for rotation.
Sourcepub fn flag_rotated(&self)
pub fn flag_rotated(&self)
Flags the memtable as requested for rotation.
Sourcepub fn iter(&self) -> impl DoubleEndedIterator<Item = InternalValue> + '_
pub fn iter(&self) -> impl DoubleEndedIterator<Item = InternalValue> + '_
Creates an iterator over all items.
Sourcepub fn get_highest_seqno(&self) -> Option<SeqNo>
pub fn get_highest_seqno(&self) -> Option<SeqNo>
Returns the highest sequence number in the memtable.
Auto Trait Implementations§
impl !Freeze for Memtable
impl !RefUnwindSafe for Memtable
impl Send for Memtable
impl Sync for Memtable
impl Unpin for Memtable
impl !UnwindSafe for Memtable
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