3 ms·
I created something similar for our project “below” (https://github.com/facebookincubator/below/blob/main/below/below_derive/src/lib.rs https://github.com/faceb
by lnyng 4y ago
I created something similar for our project “below” (https://github.com/facebookincubator/below/blob/main/below/below_derive/src/lib.rs https://github.com/facebookincubator/below/blob/main/below/b...).
The program collects system resource metrics into a data structure and we need to display the fields with different styles and formats. In order to decouple the data structure from rendering, Queriable (Keyable) and FieldId (combine KeyPath + mirror struct into enum) are used. I will definitely like to checkout the KeyPath implementation as it seems more general.