pub trait Value: ValueInternal {
// Provided methods
fn to_string<'cx, C: Context<'cx>>(
&self,
cx: &mut C,
) -> JsResult<'cx, JsString> { ... }
fn as_value<'cx, C: Context<'cx>>(&self, _: &mut C) -> Handle<'cx, JsValue> { ... }
fn to_raw(&self) -> Value { ... }
unsafe fn from_raw<'cx, C: Context<'cx>>(
cx: &C,
value: Value,
) -> Handle<'cx, Self> { ... }
}
Expand description
The trait shared by all JavaScript values.
Provided Methods§
fn to_string<'cx, C: Context<'cx>>(&self, cx: &mut C) -> JsResult<'cx, JsString>
fn as_value<'cx, C: Context<'cx>>(&self, _: &mut C) -> Handle<'cx, JsValue>
Object Safety§
This trait is not object safe.
Implementors§
impl Value for JsArray
impl Value for JsArrayBuffer
impl Value for JsBigInt
Available on crate feature
napi-6
only.