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
//! The plain, language-agnostic value model that crosses the FFI boundary.
//!
//! [`Value`] is intentionally small and JSON-shaped. The binding layer converts
//! host objects (Python `dict`/`datetime`/`Decimal`/..., or a JS object) into
//! `Value`, the core does its work, and the binding converts back. Keeping this
//! the *only* shared vocabulary is what makes the core reusable across runtimes.
use BTreeMap;
/// A single language-agnostic value.
///
/// The first variants map 1:1 onto JSON. The trailing typed-scalar variants
/// (`DateTime`, `Date`, `Decimal`, `Uuid`) exist so the cursor codec can
/// round-trip ordering keys with full fidelity — they carry the value's
/// canonical string form and the binding layer rebuilds the rich host type.
///
/// `#[non_exhaustive]`: this crate is published independently (`core-v*`) and
/// `Value` is its central vocabulary type, so a future variant (e.g. a native
/// big-integer) must not be a breaking change for downstream crates — like the
/// sibling public enums (`CoreError`, `FilterOp`, ...), it requires a `_` arm.