-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Replacing postcard with encdec #261
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't there be a generic impl encode/decode for IntoPrimitive/(try) FromPrimitive?
Otherwise looks good to me.
Would encdec instead of serde have been nicer for minimq?
Yeah, we likely can. I wonder if a blanket impl would be considered a trait impl on foreign types though? Or did you mean adding the blanket impl to
Maybe (probably)? It's hard to say for sure without trying it. Serde was definitely a bit awkward with minimq and other wire protocols and has a few hacky workarounds to the restrictive serde data model. It would be an interesting investigation to try out the |
Sure. It would need to be in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway. This discussion above can also be resolved independently.
I spawned an issue in ryankurte/rust-encdec#3 for that discussion. It would be nice to have a derive for simple enums for sure. |
This PR replaces
postcard
withencdec
.encdec
is more suitable for our precise storage requirements.I tested this with my current Booster and confirmed that my settings were retained. I also updated parameters and verified that they stuck
I have a PR for the
encdec
changes needed at ryankurte/rust-encdec#2