Question I usually use c++ lang, and recently I'm learning rust lang but now confusing the concept of lifetime. My understanding for lifetime is as follows. Is
I'm trying to create an Iterator interface using the csv crate such that I can return a HashMap of col-name: value and am running into a lifetime error I cannot
I'm trying to use. strongly typed wrapper for a "keys" in my program, so that I don't mistake arbitrary strings for a Key. I have: #[derive(Debug, Clone, Partia
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=()>