A few of us discussed which error handling crate to use on gitter.im and decided upon thiserror. This is because it conforms to std::error:Error - if it's desirable to change to another crate in the future it should be painless for us and seamless for people using native_spark.
This is a major API break for Context::new and also converts a couple of signed integers to unsigned to prevent propagation of invalid values (all values of u16 are valid ports, timeouts can't be negative, etc.).
I stopped at this point because I have to learn more about capnp, serde_closure, etc. in order to work out whether it's correct to return Results for RPCs, or whether another approach is more appropriate.
A few of us discussed which error handling crate to use on gitter.im and decided upon thiserror. This is because it conforms to
std::error:Error
- if it's desirable to change to another crate in the future it should be painless for us and seamless for people using native_spark.This is a major API break for
Context::new
and also converts a couple of signed integers to unsigned to prevent propagation of invalid values (all values of u16 are valid ports, timeouts can't be negative, etc.).I stopped at this point because I have to learn more about capnp, serde_closure, etc. in order to work out whether it's correct to return
Result
s for RPCs, or whether another approach is more appropriate.