Want for intermediate Rust book / docs: a clean cut tutorial on how to implement the Iterator trait. Took a while to figure out that for many cases we need to create a secondary struct that holds / borrows the primary struct and adds a counter / lifetimes. This isn't documented.
-
-
Oh yeah you only have to provide next for iterator but you can make your own version of the method for the trait implementation now that I'm thinking about it! Yeah this definitely then :D
-
if you are looking for a blog post to write, please do one that explains std::iter::ExactSizeIterator and friends (I know it exists and have a feeling that it's awesome but have otherwise no idea)
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.