Skip to main content

interstice_abi/interstice_value/
mod.rs

1mod convert;
2mod row;
3mod validate;
4
5pub use validate::validate_value;
6
7use serde::{Deserialize, Serialize};
8
9#[derive(Debug, Clone, Deserialize, Serialize, PartialEq)]
10pub enum IntersticeValue {
11    Void,
12    U32(u32),
13    U64(u64),
14    I32(i32),
15    I64(i64),
16    F32(f32),
17    F64(f64),
18    Bool(bool),
19    String(String),
20
21    Vec(Vec<IntersticeValue>),
22    Option(Option<Box<IntersticeValue>>),
23    Tuple(Vec<IntersticeValue>),
24
25    Struct {
26        name: String,
27        fields: Vec<Field>,
28    },
29
30    Enum {
31        name: String,
32        variant: String,
33        value: Box<IntersticeValue>,
34    },
35}
36
37#[derive(Debug, Clone, Deserialize, Serialize, PartialEq)]
38pub struct Field {
39    pub name: String,
40    pub value: IntersticeValue,
41}