Add support for constructing JsValue instances generically

This commit is contained in:
David Flemström
2018-03-28 01:22:31 +02:00
committed by Alex Crichton
parent e6a483f906
commit 73619b5d15
5 changed files with 86 additions and 4 deletions

View File

@ -94,10 +94,10 @@ impl JsValue {
}
}
// #[doc(hidden)]
// pub fn __from_idx(idx: u32) -> JsValue {
// JsValue { idx }
// }
#[doc(hidden)]
pub unsafe fn __from_idx(idx: u32) -> JsValue {
JsValue { idx }
}
//
// #[doc(hidden)]
// pub fn __get_idx(&self) -> u32 {