-
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
Trait implementations and error handling #51
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fjarri
added
WASM
Related to WASM bindings
Python
Related to Python bindings
API
Related to public API
labels
Jun 7, 2021
fjarri
force-pushed
the
trait-implementations
branch
from
June 7, 2021 05:27
2119da4
to
106eccc
Compare
Codecov Report
@@ Coverage Diff @@
## master #51 +/- ##
===========================================
- Coverage 94.28% 83.77% -10.52%
===========================================
Files 11 11
Lines 805 912 +107
===========================================
+ Hits 759 764 +5
- Misses 46 148 +102
Continue to review full report at Codecov.
|
piotr-roslaniec
approved these changes
Jun 9, 2021
TooMany/NotEnoughBytes can only be obtained from an unknown length bytestring, but the length of an array is already checked statically.
fjarri
force-pushed
the
trait-implementations
branch
from
June 13, 2021 20:19
677f6c2
to
1b57bdd
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on top of #50
HasName
trait from Python bindings into the main library and rename it toHasTypeName
Display
implementation for public types in the main library and use it in Python/WASM bindings (was formerly only implemented in Python bindings)GenericError
from Python bindings; in the cases where it is used it can be replaced byValueError
from_array()
can only return aConstructionError
now, and not a size mismatch error (because the array size is already statically asserted by the compiler)toBytes()/fromBytes()/toString()
methods to public objects in WASM bindings. Fixes Expose serialization in bindings #11 (if we decide to use some third-party serialization, likeprotobuf
, it should be made a separate issue)DeserializationError::TooManyBytes/TooFewBytes
into a singleSizeMismatch
unwrap()
in WASM bindings. Fixes Propagate errors without panics when possible in WASM bindings #14, fixes Only enableconsole_error_panic_hook
in tests #16 (console_error_panic_hook
is not needed anymore since there are no panics)Display
implementations of error types in the main library, and use them from Python/WASM bindings to form exceptionsSecretKeyFactory
in WASM bindings