Consider a user that wants to serialize their own custom types, and of course do that in ergonomic and performant way.
That means:
- No manual byte operations, the serialization impl should reuse our impls and other helper tools
- No unnecessary cloning
I encountered this when trying to improve latte tool.
When such a user has their own custom Vec, and wants to serialize it, there is a problem: T may not implement SerializeValue!
User would like to do .iter().map(|elem| SomeWrapper(elem)) (where SomeWrapper implements SerializeValue), but there is a problem: we do not implement SerializeValue for iterators. So the user has to do serialization manually, or allocate a Vec for no reason.
Consider a user that wants to serialize their own custom types, and of course do that in ergonomic and performant way.
That means:
I encountered this when trying to improve latte tool.
When such a user has their own custom Vec, and wants to serialize it, there is a problem: T may not implement SerializeValue!
User would like to do
.iter().map(|elem| SomeWrapper(elem))(whereSomeWrapperimplements SerializeValue), but there is a problem: we do not implement SerializeValue for iterators. So the user has to do serialization manually, or allocate a Vec for no reason.