pub trait TryIntoJs<'cx>where
Self: Sealed,{
type Value: Value;
// Required method
fn try_into_js(self, cx: &mut Cx<'cx>) -> JsResult<'cx, Self::Value>;
}
Expand description
Convert Rust data into a JavaScript value
Required Associated Types§
Required Methods§
Sourcefn try_into_js(self, cx: &mut Cx<'cx>) -> JsResult<'cx, Self::Value>
fn try_into_js(self, cx: &mut Cx<'cx>) -> JsResult<'cx, Self::Value>
Convert self
into a JavaScript value
Implementations on Foreign Types§
Source§impl<'a, 'cx, T> TryIntoJs<'cx> for &'a [T]
impl<'a, 'cx, T> TryIntoJs<'cx> for &'a [T]
type Value = JsTypedArray<T>
fn try_into_js(self, cx: &mut Cx<'cx>) -> JsResult<'cx, Self::Value>
Source§impl<'a, 'cx, T> TryIntoJs<'cx> for &'a Vec<T>
impl<'a, 'cx, T> TryIntoJs<'cx> for &'a Vec<T>
type Value = JsTypedArray<T>
fn try_into_js(self, cx: &mut Cx<'cx>) -> JsResult<'cx, Self::Value>
Source§impl<'cx> TryIntoJs<'cx> for Infallible
impl<'cx> TryIntoJs<'cx> for Infallible
Source§impl<'cx> TryIntoJs<'cx> for ()
impl<'cx> TryIntoJs<'cx> for ()
type Value = JsUndefined
fn try_into_js(self, cx: &mut Cx<'cx>) -> JsResult<'cx, Self::Value>
Source§impl<'cx, T> TryIntoJs<'cx> for Box<[T]>
impl<'cx, T> TryIntoJs<'cx> for Box<[T]>
type Value = JsTypedArray<T>
fn try_into_js(self, cx: &mut Cx<'cx>) -> JsResult<'cx, Self::Value>
Source§impl<'cx, T> TryIntoJs<'cx> for Vec<T>
impl<'cx, T> TryIntoJs<'cx> for Vec<T>
type Value = JsTypedArray<T>
fn try_into_js(self, cx: &mut Cx<'cx>) -> JsResult<'cx, Self::Value>
Source§impl<'cx, T, const N: usize> TryIntoJs<'cx> for [T; N]
impl<'cx, T, const N: usize> TryIntoJs<'cx> for [T; N]
type Value = JsTypedArray<T>
fn try_into_js(self, cx: &mut Cx<'cx>) -> JsResult<'cx, Self::Value>
Implementors§
Source§impl<'cx> TryIntoJs<'cx> for neon::types::extract::json::Error
Available on crate feature serde
only.
impl<'cx> TryIntoJs<'cx> for neon::types::extract::json::Error
Available on crate feature
serde
only.Source§impl<'cx> TryIntoJs<'cx> for ArrayBuffer
impl<'cx> TryIntoJs<'cx> for ArrayBuffer
type Value = JsArrayBuffer
Source§impl<'cx, T> TryIntoJs<'cx> for Json<T>where
T: Serialize,
Available on crate feature serde
only.
impl<'cx, T> TryIntoJs<'cx> for Json<T>where
T: Serialize,
Available on crate feature
serde
only.