Skip to content

Allow ignoring fields #174

@mashedcode

Description

@mashedcode

If one has a structure which carries data and temporary state. One might want to encode only the data and ignore the rest.

It seems to me that the simplest way to implement this would be to simply ignore fields which are not annotated.
As part of this I'd also stop generating impl Default since a user may very well want to implement it himself to initialize the ignored fields correctly.
For generated code a simple #[derive(Default should do the trick IIUC.
Either way this would be a breaking change.

Suggestions?

I'd be happy to implement.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions