Is there a collection of @rustlang FFI utilities to help convert C types to Rust types? I'm noticing I'm repeating myself a bit.
I'm thinking something similar to git2-rs's Convert trait but as a standalone crate. Is there something like that?
https://github.com/alexcrichton/git2-rs/blob/739ae40aefb292ec72daa11ad9f33ed458a2afa8/src/call.rs#L31-L36 …;
(I remember reading something about this on the forums recently, but I can't find it?)
-
-
Isn't that From/Into?
-
Yeah partially, but there are some other things such as utf-8 validation, error casting (e.g. make Try work) and more. Just wondering if people have come up with clever abstractions to reduce the boilerplate. Not sure what the answer necessarily would look like.
End of conversation
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.