uneval
uneval copied to clipboard
Uneval your data into Rust code
I ran into issues using `uneval` to serialize a recursive type, which required `Box` for some of its children. This PR tweaks the serialization code to emit a `.into()` call...
This crate is not working with `#[serde(rename_all = "...")]` with error message which looks like `error[E0599]: no variant or associated item named `...` found for enum `...` in the current...
It appears that some sort of casting is needed once usize is serialized to u64. Serde does not support native type `usize` (see https://docs.rs/serde/1.0.152/serde/trait.Serializer.html) ```rust #[derive(serde::Serialize, serde::Deserialize)] struct MyStruct {...
If the type being serialized has fields containing `Box`, the field's expression is assigned to the inner value, not wrapped in `Box::new()`, which causes a compiler error.
I learned about this create from https://users.rust-lang.org/t/ron-are-there-crates-to-serialize-rust-types-as-correctly-formated-rust-code/55451 Could one prefer const/static forms when they exist? As a type level example, if `T` could be converted to `'static` then `Cow`. As...