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
//! `DataPoint` — common contract for everything a `Series<T>` can hold.
//!
//! Each market data class (trade, bar, ticker, OB snapshot, ...) provides:
//! - a fixed on-disk record size in bytes,
//! - encode/decode (little-endian, no allocations),
//! - timestamp accessor (used by warm-start / range queries),
//! - extractor from `digdigdig3::core::types::StreamEvent` (returns None if the
//! event is for a different stream class).
//!
//! Variable-length payload is supported via opt-in blob hooks: if a type's
//! header carries a `(blob_offset, blob_len)` pointer pair at its tail, the
//! companion `.blob` file holds the actual variable-length bytes. Types that
//! do not need a blob inherit the default `None` impls and never trigger the
//! `.blob` codepath.
use StreamEvent;
/// Implemented by every data-class held in a [`crate::series::Series`].