fn field(&self, field: &str, pos: &Position) -> Result<Field, Vec<TypeErr>> {
        if let Some(generic_field) = self.fields.iter().find(|c| c.name == field) {
            let generics = HashMap::new();
            Field::try_from((generic_field, &generics, pos))
        } else {
            let msg = format!("Field {} is undefined.", field);
            Err(vec![TypeErr::new(pos, &msg)])
        }
    }
/// Look up a field and substitutes generics to yield a Field.
Look up a field and substitutes generics to yield a Field.
Look up a field and substitutes generics to yield a Field .
fn field(&self, field: &str, pos: &Position) -> Result<Field, Vec<TypeErr>> {
        if let Some(generic_field) = self.fields.iter().find(|c| c.name == field) {
            let generics = HashMap::new();
            Field::try_from((generic_field, &generics, pos))
        } else {
            let msg = format!("Field {} is undefined.", field);
            Err(vec![TypeErr::new(pos, &msg)])
        }
    }
fn field ( & self , field : & str , pos : & Position ) -> Result < Field , Vec < TypeErr > > { if let Some ( generic_field ) = self . fields . iter ( ) . find ( | c | c . name == field ) { let generics = HashMap :: new ( ) ; Field :: try_from ( ( generic_field , & generics , pos ) ) } else { let msg = format ! ( " " field ) ; Err ( vec ! [ TypeErr new ( pos msg ) ] ) } }
Look up a field and substitutes generics to yield a Field.
Look up a field and substitutes generics to yield a Field .
&self
field
&str
pos
&Position