stdweb
crateThis crate currently defines a derive macro for [stdweb]
which allows you to define custom reference types outside
of stdweb
.
For example:
```rust
pub struct Error( Reference );
pub struct TypeError( Reference ); ```
And then you can do:
``rust
// You can use
tryintoto cast a
Value` to your type.
let error: TypeError = js!( return new TypeError(); ).tryinto().unwrap();
// You can also pass your type freely into the js!
macro:
js!( console.log( @{error} ); );
```