use { alloc::{string::String, vec::Vec}, hashbrown::HashMap, log::info, }; pub struct Type {} pub struct Funct { takes: Vec, gives: Vec, } pub struct Protocol { types: HashMap, fns: HashMap, } impl Protocol { pub fn void() -> Self { Self { types: HashMap::new(), fns: HashMap::new(), } } // Check if a protocol defines all types it needs too fn validate_protocol() -> bool { false } } impl From for Protocol { fn from(value: alloc::string::String) -> Self { if value.starts_with("protocol") { info!("ABC"); } Self { types: HashMap::new(), fns: HashMap::new(), } } }