aboutsummaryrefslogtreecommitdiff
path: root/src/object/mod.rs
blob: 08f76cd90b7502e058d9ba2a8d7893f82a694880 (plain)
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
use serde::Serialize;
use std::collections::BTreeMap;

pub mod helper;
pub mod parser;
pub mod read;

#[derive(Debug, Clone, Serialize)]
pub enum Value {
    Bool(bool),
    U8(u8),
    I8(i8),
    U16(u16),
    I16(i16),
    U32(u32),
    I32(i32),
    F32(f32),
    U64(u64),
    I64(i64),
    F64(f64),
    Array(Vec<Value>),
    Object {
        class: String,
        file: usize,
        fields: BTreeMap<String, Value>,
    },
    Typeless(Vec<u8>),
    String(String),
}