Derive Serialize and Deserialize for newtype with generics
greyblake opened this issue · comments
Something like this is expected to work:
#[nutype(
derive(Serialize, Deserialize)
)]
struct Collection<T(Vec<T>);
#[nutype(
derive(
Debug,
Serialize,
Deserialize,
),
)]
pub struct Borrowing<'a>(Cow<'a, str>);
Add test coverage:
- With validation
- Without validation
Addressed in #142