You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to some issues with the Python cbor2 library, I decided to add deserialization support to pycddl. My prototype works great, and will hopefully release this soon.
The issue is that currently I need to parse the CBOR twice, or clone the parsed value resulting in extra memory usage, because:
cddl::validator::cbor::CBORValidator takes ownership of the ciborium::cbor::Value.
There is no way to extract that value back out once validation is over.
This should be solvable by adding a method to CBORValidator that takes self and returns the Value back out. If you have a specific way you'd prefer this done (extract_value()? impl From<CBORValidator> for ciborium::cbor::Value?) let me know, I can submit a PR either way. Or I'll just choose one if you don't have an opinion.
The text was updated successfully, but these errors were encountered:
Due to some issues with the Python
cbor2
library, I decided to add deserialization support to pycddl. My prototype works great, and will hopefully release this soon.The issue is that currently I need to parse the CBOR twice, or clone the parsed value resulting in extra memory usage, because:
cddl::validator::cbor::CBORValidator
takes ownership of theciborium::cbor::Value
.This should be solvable by adding a method to
CBORValidator
that takesself
and returns theValue
back out. If you have a specific way you'd prefer this done (extract_value()
?impl From<CBORValidator> for ciborium::cbor::Value
?) let me know, I can submit a PR either way. Or I'll just choose one if you don't have an opinion.The text was updated successfully, but these errors were encountered: