Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read_with and write_with attribute for fields #71

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tecc
Copy link

@tecc tecc commented Jul 23, 2024

The read_with and write_with attributes have been added. They override the generated implementation for reading/writing individual fields, similarly to how Serde's deserialize_with and serialize_with attributes work.

The with attribute has also been added as a utility, which sets both read_with and write_with simultaneously.

See the README.md for more specific documentation. Closes #12.

tecc added 2 commits July 23, 2024 02:03
The `read_with` and `write_with` attributes have been added.
They override the generated implementation for reading/writing individual fields,
similarly to how Serde's `deserialize_with` and `serialize_with` attributes work.

The `with` attribute has also been added as a utility,
which sets both `read_with` and `write_with` simultaneously.

See the README.md for more specific documentation.
Closes koute#12.
A missing statement end has been added in the implementation of the `Writable` derive macro (see `write_field_body`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Attribute: "read_fn" / "write_fn"
1 participant