Skip to content
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

Support JsValue's inside Result and Option types #2

Open
allsey87 opened this issue Oct 11, 2024 · 1 comment
Open

Support JsValue's inside Result and Option types #2

allsey87 opened this issue Oct 11, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@allsey87
Copy link
Owner

The arguments of RPC currently have to be either serializable or JsValue. Ideally, this restriction should be relaxed to allow composite types, e.g., an arbitrary struct or enum containing a JsValue to be sent across a channel, however, at a bare minimum it should be possible to have RPC calls that can return a Result<T, JsValue> since this pattern is used to represent exceptions from Javascript code.

@allsey87 allsey87 added the enhancement New feature or request label Oct 11, 2024
@allsey87 allsey87 added this to the 0.1.0 milestone Oct 11, 2024
@allsey87 allsey87 self-assigned this Oct 11, 2024
@allsey87
Copy link
Owner Author

Note that only some errors are supported by the structured clone algorithm: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm#javascript_types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant