seq-marked
Sequence-numbered values with tombstone support for LSM trees and versioned data.
Core Types
Marked<D>: Data that can be marked as tombstoneSeqMarked<D>: Sequence-numbered marked value
Usage
use ;
// Basic sequence-numbered values
let v1 = new_normal;
let v2 = new_normal;
let v2_ts = new_tombstone;
assert!; // ordered by sequence
assert!; // tombstone > normal
// Working with marked values
let data = Normal;
let tombstone = TombStone;
assert!;
// Accessing data
assert_eq!;
assert_eq!;
assert!;
// Transform data while preserving sequence
let lengths = v1.map;
assert_eq!;
API Overview
Marked<D>
Normal(D)- contains dataTombStone- deletion marker- Tombstones are always ordered after normal values
SeqMarked<D>
new_normal(seq, data)- create normal valuenew_tombstone(seq)- create tombstoneseq()- get sequence numberdata_ref()/into_data()- access datais_normal()/is_tombstone()- check typemap(fn)- transform data while preserving sequenceorder_key()- get ordering key without data
Features
- Sequence-based ordering with tombstone support
- Optional serde/bincode serialization
- Comprehensive ordering semantics for LSM trees
License
Apache License 2.0 - see LICENSE file for details.
Contributing
Contributions welcome! Please ensure all tests pass and code is properly formatted before submitting a PR.