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<'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 &[T]
impl<'cx, T> TryIntoJs<'cx> for &[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, B> TryIntoJs<'cx> for ArrayBuffer<B>
impl<'cx, B> TryIntoJs<'cx> for ArrayBuffer<B>
type Value = JsArrayBuffer
Source§impl<'cx, T> TryIntoJs<'cx> for BigInt64Array<T>
impl<'cx, T> TryIntoJs<'cx> for BigInt64Array<T>
type Value = JsTypedArray<i64>
Source§impl<'cx, T> TryIntoJs<'cx> for BigUint64Array<T>
impl<'cx, T> TryIntoJs<'cx> for BigUint64Array<T>
type Value = JsTypedArray<u64>
Source§impl<'cx, T> TryIntoJs<'cx> for Float32Array<T>
impl<'cx, T> TryIntoJs<'cx> for Float32Array<T>
type Value = JsTypedArray<f32>
Source§impl<'cx, T> TryIntoJs<'cx> for Float64Array<T>
impl<'cx, T> TryIntoJs<'cx> for Float64Array<T>
type Value = JsTypedArray<f64>
Source§impl<'cx, T> TryIntoJs<'cx> for Int16Array<T>
impl<'cx, T> TryIntoJs<'cx> for Int16Array<T>
type Value = JsTypedArray<i16>
Source§impl<'cx, T> TryIntoJs<'cx> for Int32Array<T>
impl<'cx, T> TryIntoJs<'cx> for Int32Array<T>
type Value = JsTypedArray<i32>
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.