Skip to content

Add Schema::into_serde_schema #15

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

Merged
merged 2 commits into from
Jan 31, 2021
Merged

Add Schema::into_serde_schema #15

merged 2 commits into from
Jan 31, 2021

Conversation

ucarion
Copy link
Contributor

@ucarion ucarion commented Jan 31, 2021

This PR adds Schema::into_serde_schema, an inverse to from_serde_schema.

This PR continues to deliberately avoid using the stdlib's Into/From traits to achieve this, because 1) it's easier to add support for that than to remove it, and 2) it seems to be relatively unusual to have such a business-logic-heavy sort of conversion be done via Into/From implementations.

@ucarion ucarion merged commit b2c6718 into master Jan 31, 2021
@ucarion ucarion deleted the ucarion/to-serde-schema branch January 31, 2021 17:20
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.

1 participant