It'll make encapsulation a little bit better. For example with my `webmanifest` module I don't want people to have to also remember to import `serde` + `serde_json`. So we need to create a custom `from_string()` method, which would be better served using the TryFrom trait!
Just realized stabilizing `.try_from()` will be really cool for custom types to build in serde conversions: use my_crate::CustomStruct; let p = "./some/path.json"; let custom: CustomStruct = fs::read_to_string(p)?.try_into()?;
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
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.