8 impl std::ops::Index<&str> for Indexable {
9 type Output = Indexable;
11 fn index(&self, field: &str) -> &Indexable {
16 impl std::ops::IndexMut<&str> for Indexable {
17 fn index_mut(&mut self, field: &str) -> &mut Indexable {
23 let mut v = Indexable;
24 let field = "hello".to_string();
26 v[field.as_str()].boo();
28 v[&field].boo(); // < This should work