1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! The raw-byte view the flat directory layout works over.
//!
//! A [`RawKv`] is a read/write view over one store's raw (unstructured)
//! byte map — no keyspace semantics, just bytes. The flat backends
//! implement it over their transaction views (the btreemap backend's
//! buffered base+delta view; the redb backend's read-write transaction)
//! and route every directory-layout operation through
//! [`FlatEngine`](crate::flatengine::FlatEngine), so the layout logic is
//! written and tested once.
//!
//! All reads return **owned** bytes: the layout machinery decodes and
//! collects before returning, and the backends stream from that owned
//! result (which they keep alive in their stream handle), so no borrow
//! from the engine view escapes.
use Bound;
use crateKvPair;
/// A read/write view over a raw byte map.
///
/// Implementations must honour the empty-range contract: an `is_empty_range`
/// range (see [`crate::is_empty_range`]) yields no rows and performs no
/// mutation.