valkyrie-types 0.0.8

Shard types for valkyrie language
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use super::*;

impl ConvertTo<FieldType> for ValkyrieField {
    fn convert(&self) -> FieldType {
        let mut field = FieldType::new(self.symbol.to_string());
        field.readonly = self.get_readonly();
        match &self.typing {
            Some(s) => field.set_type(s.convert()),
            None => panic!("Run type infer first"),
        }
        field
    }
}