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.
-
-
Using the terms I wrote about before: - entry level: learn what iterators are and how to use them. - intermediate: learn how to implement iterators for your own types. - seasoned: not sure, haven't hit this point yet.https://twitter.com/yoshuawuyts/status/1006654124505681921 …
Show this thread -
Anyway, I've implemented my first, actual iterator! This will allow us to Run Length Encode our bitfields in datrs/hypercore. This implementation will also be more efficient than the JS version because we can keep the pager sparse at all times :Dhttps://github.com/datrs/memory-pager/pull/6/files …
Show this thread -
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.