Rantanen / intercom

Object based cross-language FFI for Rust
MIT License
63 stars 7 forks source link

ComResult should be Result<_, ComError> #74

Closed Rantanen closed 5 years ago

Rantanen commented 6 years ago

We should surface the ComError better in Rust. This means making it available as the Err-value in ComResult.

Though for performance reasons we will need to either...

The former would result in simpler intercom type system. However if the on-demand stuff happens much later the error message might have been overwritten already. The latter would allow us to resolve the ComError for ComResults immediately and also allow ComError to be send/sync given it would be immutable. (On-demand resolution would prevent send since the error message needs to be resolved in the thread where it happened).