piet is a drawing library with generic backends (cairo, for example). I want to have a trait Renderable that can render to any piet backend (=context). pub trai
I am trying to #[derive(Deserialize, Serialize)] some structs that involve other custom structs, so I can transform them in and out of JSON, for example: #[deri
I bumped into an interesting form of lifetime sub-typing, which I think is valid, but the compiler is skeptical of. Consider the following function, which compu
Code Playground (Stable Rust 1.45.0, 2018 edition) No external crates needed for example. type Error = Box<dyn std::error::Error>; type Result<R=()>