Open lotia opened 5 years ago
Looking at https://github.com/biomunky/newsapi/blob/a74dc5afe90a076effbbaabc1585d37851cfc6ea/src/newsapi/newsapi.rs#L34 and similar and wondering if we can use a product type (usefully rather than for the sake of the types) so we can keep params in the mix as type and then convert all at once?
Using as inspiration and clarificaion of product types in Rust https://manishearth.github.io/blog/2017/03/04/what-are-sum-product-and-pi-types/
So use a struct in some way?
I had a quick look, it is more complex than I initially expected when we discussed on Telegram.
Looking at https://github.com/biomunky/newsapi/blob/a74dc5afe90a076effbbaabc1585d37851cfc6ea/src/newsapi/newsapi.rs#L34 and similar and wondering if we can use a product type (usefully rather than for the sake of the types) so we can keep params in the mix as type and then convert all at once?
Using as inspiration and clarificaion of product types in Rust https://manishearth.github.io/blog/2017/03/04/what-are-sum-product-and-pi-types/
So use a struct in some way?