1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#[derive(Clone, Debug)]
pub struct TypeDescriptor {
pub name: String,
pub kind: TypeKind,
}
#[derive(Clone, Debug)]
pub struct TypeField {
pub fieldname: String,
pub kind: TypeDescriptor,
}
#[derive(Clone, Debug)]
pub enum TypeKind {
Bits(usize),
Signed(usize),
Enum(Vec<String>),
Composite(Vec<Box<TypeField>>),
}