strata/
value.rs

1use std::collections::BTreeMap;
2
3/// Core Strata value type.
4/// This is the in-memory representation used by encoders/decoders.
5/// Integer semantics (Northstar v1):
6/// - All integers are signed 64-bit (i64)
7/// - No floats, no implicit coercions
8/// - Encoded using canonical SLEB128
9/// - Cross-language implementations MUST map to i64 exactly
10#[derive(Debug, Clone, PartialEq, Eq)]
11pub enum Value {
12    Null,
13    Bool(bool),
14    Int(i64),
15    String(String),
16    Bytes(Vec<u8>),
17    List(Vec<Value>),
18    Map(BTreeMap<String, Value>),
19}