use {
    alloc::{string::String, vec::Vec},
    hashbrown::HashMap,
    log::info,
};
#[derive(Debug, PartialEq, Clone)]
pub struct Type {}
#[derive(Debug, PartialEq, Clone)]
pub struct Funct {
    takes: Vec<String>,
    gives: Vec<String>,
}
#[derive(Debug, PartialEq, Clone)]
pub struct Protocol {
    types: HashMap<String, Type>,
    fns:   HashMap<String, Funct>,
}
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<String> for Protocol {
    fn from(value: alloc::string::String) -> Self {
        let mut hm_t = HashMap::new();
        hm_t.insert(value, Type {});
        Self {
            types: hm_t,
            fns:   HashMap::new(),
        }
    }
}