Re:Rust for JavaScript Developers – Pattern Matching and Enums
by mamcx on Sunday July 12, 2020 @09:02PM
(#23816117)
> This often makes the system brittle to new changes because subsystems have very strict expectations of data schema, even when they don't really need to care about i
I deal a lot with this, because I interface with software outside my control. In the case of Rust I find super easy to solve, just use this litte trick:
I deal a lot with this, because I interface with software outside my control. In the case of Rust I find super easy to solve, just use this litte trick:
https://serde.rs/attr-flatten.html
#[derive(Serialize, Deserialize)] struct User { id: String, username: String,
Serde is very good. Near all you want is there.