-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
assert_impl_all! with serde::Deserialize #30
Comments
If/when #28 gets accepted, I believe the following would work:
In the meantime, I think using |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
serde::Deserialize
takes the lifetime parameter<'de>
. How should I check that a class derives serde::Deserialize?One of the working solutions is
assert_impl_all!(MyType : serde::Deserialize<'static>);
, using the trick that'static
is available everywhere. However, is this the best practice?Please consider adding this note to the documentation.
The text was updated successfully, but these errors were encountered: