owml_parser/types.rs
1use alloc::vec::Vec;
2
3/// The main type enum for owml, containing the type along with the
4/// corrosponding data.
5#[derive(Debug, PartialEq)]
6pub enum OType<'a> {
7 StringType(&'a str),
8 IntType(i32),
9 ObjectType(Vec<OKeyPair<'a>>),
10 ArrayType(Vec<OType<'a>>),
11}
12
13/// A wrapper for two OTypes. Used as a frontend for having a name and data.
14#[derive(Debug, PartialEq)]
15pub struct OKeyPair<'a> {
16 pub name: OType<'a>,
17 pub data: OType<'a>,
18}