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

Could the error method of ReplyXxx be moved to trait Reply? #296

Open
mawenqi opened this issue Sep 19, 2024 · 0 comments
Open

Could the error method of ReplyXxx be moved to trait Reply? #296

mawenqi opened this issue Sep 19, 2024 · 0 comments

Comments

@mawenqi
Copy link

mawenqi commented Sep 19, 2024

Can we add a new error method to the Reply trait, like
fn error(self, err: c_int);

This would allow multiple ReplyXxx types to share the same method implement, as they all currently have this method with identical signature and implement.
More important, it would enable the definition of a unified error handling function, like so:
fn handle_error(err: MyErrorType, reply: impl Reply)

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

No branches or pull requests

1 participant