-
Notifications
You must be signed in to change notification settings - Fork 20
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
add support for time::Time
#43
base: main
Are you sure you want to change the base?
Conversation
Thanks for the PR! I'm curious why you didn't use the
Could be because |
@finnbear I've addressed your review. Do you think I should add support for |
Thanks! As far as I'm personally concerned, there is no need to wait for implementing all types of a crate before merging any given PR. This PR looks good to me! 👍 But I want to here @caibear's opinion on supporting the
Only room for improvement that I can see is to make a macro to define a limited-range integer, such as |
Hey @finnbear (and @caibear as well XD), speaking about macro, have you ever considered adding some internal proc-macro. Like |
Thank you for your review. I add a |
We have been considering using bitcode's derive macro on remote types by running it on a copy of the remote type declaration but replacing the local type with the remote type in the macro's output. This would allow implementing Encode/Decode easily on any type with all public fields such as The main roadblock is that currently with 0.6, |
Part of #37, I would like your opinion about this approach @finnbear. Thank you!
I move out
Nanosecond
todatetime
so later it can be reused by other crate (for example #39)I am not sure why but this line throw an error:
assert!(crate::decode::<Time>(&crate::encode(&(23, 59, 59, 999_999_999))).is_ok());
whenpopulate
nanosecond. Could you check for me if there are any typo here :/ That is so weird