Skip to content

Allow serialization of some iterators #1628

@Lorak-mmk

Description

@Lorak-mmk

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.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions