Skip to main content

Crate web_rpc_macro

Crate web_rpc_macro 

Source

Macros§

endpoint
Render a Javascript endpoint and a .d.ts for the other end of a connection into two custom sections of the wasm binary. See the web_rpc::js module.

Attribute Macros§

service
This attribute macro should be applied to traits that need to be turned into RPCs. The macro consumes the trait and outputs four items in its place. For a trait Calculator those are the structs CalculatorClient and CalculatorService, a new trait by the same name, and a CALCULATOR_DESCRIPTION const describing the trait for web_rpc::js::endpoint!. All methods must include &self as their first parameter.