-
Notifications
You must be signed in to change notification settings - Fork 45
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
No way to access stdweb's ConversionError
#39
Comments
For some of the situations it might be possible to create our own type alias without wrapping pub type ConversionError = <i32 as TryFrom<Value>>::Error |
We could simplify a lot I suppose by returning a trait object implementing
|
Ah, hm. I hadn't thought of the possibility of doing checks outside of JS. One thing that might help here is Above might be a bit off-topic, but I don't know if we have a particularly on-topic issue for discussing this. |
CC koute/stdweb#280. |
Most of
stdweb
conversion return aConversionError
when it fails. The problem with this is that the struct is kept private. Admittedly, it is exposed (but hidden) throughstdweb::private
, however, this is not really a fix as we would still have problems with associated types not resolving to concrete types.My suggestion would be to define a
ConversionError
owned by out lib that would box overstdweb
's ownConversionError
. This would remove a lot of headaches due to associated type.The text was updated successfully, but these errors were encountered: