Motivation
Users seems to often employ the newtype pattern (i.e., define single-field structs) to wrap the driver's types that implement {De,S}erialize{Value,Row}. In such case, they are forced to manually implemenent (trivially) the respective de/ser traits for those new types.
Solution
Add support for a new item-level attribute, #[scylla(transparent)]:
- on single-field structs (the original use case),
- on single-variant enums (because why not; technically, it's the same).
The semantics is simple: delegate the trait method's implementation to the only field/variant of the struct/enum.
Motivation
Users seems to often employ the newtype pattern (i.e., define single-field structs) to wrap the driver's types that implement
{De,S}erialize{Value,Row}. In such case, they are forced to manually implemenent (trivially) the respective de/ser traits for those new types.Solution
Add support for a new item-level attribute,
#[scylla(transparent)]:The semantics is simple: delegate the trait method's implementation to the only field/variant of the struct/enum.