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

Rework errors #114

Open
2 tasks
Stranger6667 opened this issue Jun 13, 2020 · 2 comments
Open
2 tasks

Rework errors #114

Stranger6667 opened this issue Jun 13, 2020 · 2 comments

Comments

@Stranger6667
Copy link
Owner

Stranger6667 commented Jun 13, 2020

  • Avoid lifetimes. There is already Arc inside validators, this might be a way to avoid refs to the schema.
  • Rename validate to iter_errors and add validate that will return the first error
@hoijui
Copy link

hoijui commented Nov 3, 2021

I am here mainly for the second part (Owned version of errors). without this, I do not know how to wrap ValidationError within my own thiserror enum. I Can get it to work somehow, but It would be a lot of lines of code.
(I am still a rust newb)

@Stranger6667
Copy link
Owner Author

@hoijui There is a pub(crate) to_owned function which surely could be replaced by the ToOwned implementation - though, I am not yet sure if it will be sufficient. Let me know if I can help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants