#[derive(Debug, Clone)] pub enum Types { String, Bool, F32, F64, I8, I16, I32, I64, U8, U16, U32, U64, Array(Box), Optional(Box), Named(String) } #[derive(Debug, Clone, Default)] pub struct EnumTy { pub name: String, pub values: Vec<(String, usize)> } #[derive(Debug, Clone)] pub struct FieldTy { pub name: String, pub ty: Types } #[derive(Debug, Clone, Default)] pub struct StructTy { pub name: String, pub fields: Vec } #[derive(Debug, Clone, Default)] pub struct MethodTy { pub name: String, pub args: Vec, pub ret: Option, pub ret_stream: bool } #[derive(Debug, Clone, Default)] pub struct ServiceTy { pub name: String, pub methods: Vec } #[derive(Debug, Clone, Default)] pub struct RPC { pub enums: Vec, pub structs: Vec, pub services: Vec }