so am I right in thinking that every rust function with a generic return, e.g. collect(), sum(), into(), is implemented by constraining the return to implement some trait and then just calling that trait?
-
-
I may write up how I came to understand this as a blog post
-
You may find this code mildly interesting as well: https://github.com/diesel-rs/diesel/blob/master/diesel/src/sqlite/connection/raw.rs#L93-L96 … -- only case I've ever needed explicit turbofish for a generic argument and not the return type.
- 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.