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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//! Storage API to adapt to different storage backends.
use Debug;
use io;
use Write;
pub type BoxReaderAt = ;
pub type BoxWriter = ;
/// A stateless positional reader.
///
/// `read_exact_at` takes an explicit `offset` and `&self`, so implementations
/// must be safe to call concurrently from multiple threads on the same
/// handle — typically by using positional I/O such as `pread(2)` on unix or
/// `ReadFile` with `OVERLAPPED` on windows. This is the sole read API used
/// by rotbl's hot block-load path, so that N concurrent cache misses can
/// issue N parallel disk reads instead of serializing behind a single file
/// mutex.
/// Represents a writer for the storage system.
///
/// The writer must implement the `Write` trait to handle data writing operations.
/// Additionally, it must implement the `finalize()` method to ensure data is properly
/// finalized and persisted to storage. The target file should remain hidden until
/// the `finalize()` method is called, ensuring data consistency and integrity.
/// This trait defines the behavior required to read and write data to persistent storage.