I wanted to post an update and say ‘thanks a lot!’ to everyone giving feedback.
Although putting a format like this into the official docs didn’t work out, I wanted to see it being wrapped up. The result therefore now lives under cheats.rs.
I’m happy to collect more feedback in the repo, my plan to let it live there for a bit and see what the resonance is (and where the rest of the docs go).
And to reply to some of the previous comments:
I’m struggling to think of any “visual” aspect to lifetimes and trait bounds (in their full generality; not just pedagogical simplifcations like “lifetime = pair of curly braces” that fall apart with NLL, HRTB, etc). Did you have any ideas here?
I linked one about lifetimes in the current version. I think it’s a start, but (like the container cheat sheet) I would prefer more complex examples. Right now it’s more of a vague feeling that it should be possible to do that, although I don’t know exactly how.
Two observations: In the “Entity Creation & Usage” section, don’t you have the slice-like indexing for Range and RangeFull interchanged?
Yes, thanks, fixed it!
Also, I feel that the “Common Operators” section should include Add/AddAssign, Sub/SubAssign, Mul/MulAssign, Rem/RemAssign, BitAnd/BitAndAssign and logical AND.
I tried this with a few designs, but always felt the common operators were cluttering the more interesting bits. I now went the opposite and removed that section completely and just point at std::ops.