Deserialize a Vec<Foobar<T>> as Vec<T> directly when Foobar has exactly one field
问题 I'm given a data-format that includes a sequence of objects with exactly one named field value each. Can I remove this layer of indirection while deserializing? When deserializing, the natural representation would be /// Each record has it's own `{ value: ... }` object #[derive(serde::Deserialize)] struct Foobar<T> { value: T, } /// The naive representation, via `Foobar`... #[derive(serde::Deserialize)] struct FoobarContainer { values: Vec<Foobar<T>>, } While Foobar adds no extra cost beyond