docs.rs failed to build neon-serde-0.4.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Neon-serde
This crate is a utility to easily convert values between
A Handle<JsValue>
from the neon crate
and any value implementing serde::{Serialize, Deserialize}
Versions support
neon-serde is tested on node
8
10
12
Usage
neon_serde::from_value
Convert a Handle<js::JsValue>
to
a type implementing serde::Deserialize
neon_serde::to_value
˚
Convert a value implementing serde::Serialize
to
a Handle<JsValue>
Export Macro example
The export! macro allows you to quickly define functions automatically convert thier arguments
extern crate neon;
extern crate neon_serde;
extern crate serde_derive;
extern crate serde_bytes;
export!
Direct Usage Example
extern crate neon_serde;
extern crate neon;
extern crate serde_derive;
use *;
Limitations
Data ownership
All Deserialize Values must own all their data (they must have the trait serde::DererializeOwned
)