pub struct Segment { /* private fields */ }
Expand description
Disk segment (a.k.a. SSTable
, SST
, sorted string table
) that is located on disk
A segment is an immutable list of key-value pairs, split into compressed blocks.
A reference to the block (block handle
) is saved in the “block index”.
Deleted entries are represented by tombstones.
Segments can be merged together to improve read performance and reduce disk space by removing outdated item versions.
Implementations§
source§impl Segment
impl Segment
sourcepub fn get_highest_seqno(&self) -> SeqNo
pub fn get_highest_seqno(&self) -> SeqNo
Returns the highest sequence number in the segment.
sourcepub fn tombstone_count(&self) -> u64
pub fn tombstone_count(&self) -> u64
Returns the amount of tombstone markers in the Segment
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Segment
impl RefUnwindSafe for Segment
impl Send for Segment
impl Sync for Segment
impl Unpin for Segment
impl UnwindSafe for Segment
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