pub trait ToNapiValue {
    // Required method
    unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>;
}

Required Methods§

source

unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>

Safety

this function called to convert rust values to napi values

Implementations on Foreign Types§

source§

impl ToNapiValue for i32

source§

impl ToNapiValue for u128

source§

unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>

source§

impl ToNapiValue for u8

source§

impl ToNapiValue for i16

source§

impl ToNapiValue for u16

source§

impl ToNapiValue for &Vec<i8>

source§

unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>

source§

impl ToNapiValue for &Vec<i16>

source§

unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>

source§

impl ToNapiValue for i8

source§

impl ToNapiValue for f64

source§

impl<K, V, S> ToNapiValue for HashMap<K, V, S>where K: AsRef<str>, V: ToNapiValue,

source§

unsafe fn to_napi_value(raw_env: napi_env, val: Self) -> Result<napi_value>

source§

impl ToNapiValue for Value

source§

unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>

source§

impl ToNapiValue for Map<String, Value>

source§

unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>

source§

impl ToNapiValue for &Vec<f64>

source§

unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>

source§

impl ToNapiValue for Number

source§

unsafe fn to_napi_value(env: napi_env, n: Self) -> Result<napi_value>

source§

impl<T, const N: usize> ToNapiValue for [T; N]where T: ToNapiValue + Copy,

source§

unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>

source§

impl ToNapiValue for &Vec<bool>

source§

unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>

source§

impl ToNapiValue for String

source§

unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>

source§

impl ToNapiValue for &str

source§

unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>

source§

impl ToNapiValue for u32

source§

impl ToNapiValue for &Vec<i32>

source§

unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>

source§

impl ToNapiValue for &Vec<u16>

source§

unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>

source§

impl ToNapiValue for u64

source§

unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>

source§

impl ToNapiValue for i128

source§

unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>

source§

impl<T> ToNapiValue for Vec<T>where T: ToNapiValue,

source§

unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>

source§

impl ToNapiValue for i64

source§

impl ToNapiValue for f32

source§

impl ToNapiValue for &Vec<String>

source§

unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>

source§

impl ToNapiValue for &Vec<u8>

source§

unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>

source§

impl<T> ToNapiValue for Option<T>where T: ToNapiValue,

source§

unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>

source§

impl ToNapiValue for isize

source§

unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>

source§

impl ToNapiValue for bool

source§

impl ToNapiValue for usize

source§

unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>

source§

impl ToNapiValue for &Vec<i64>

source§

unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>

source§

impl ToNapiValue for &Vec<u32>

source§

unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>

source§

impl<T> ToNapiValue for &[T]where T: ToNapiValue + Copy,

source§

unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>

source§

impl ToNapiValue for DateTime<Utc>

Implementors§

source§

impl ToNapiValue for &Buffer

source§

impl ToNapiValue for &mut BigInt64Array

source§

impl ToNapiValue for &mut BigUint64Array

source§

impl ToNapiValue for &mut Buffer

source§

impl ToNapiValue for &mut Float32Array

source§

impl ToNapiValue for &mut Float64Array

source§

impl ToNapiValue for &mut Int8Array

source§

impl ToNapiValue for &mut Int16Array

source§

impl ToNapiValue for &mut Int32Array

source§

impl ToNapiValue for &mut Uint8Array

source§

impl ToNapiValue for &mut Uint8ClampedArray

source§

impl ToNapiValue for &mut Uint16Array

source§

impl ToNapiValue for &mut Uint32Array

source§

impl ToNapiValue for JsRangeError

source§

impl ToNapiValue for JsSyntaxError

source§

impl ToNapiValue for JsTypeError

source§

impl ToNapiValue for Latin1String

source§

impl ToNapiValue for Array

source§

impl ToNapiValue for BigInt64Array

source§

impl ToNapiValue for BigInt

source§

impl ToNapiValue for BigUint64Array

source§

impl ToNapiValue for Buffer

source§

impl ToNapiValue for Float32Array

source§

impl ToNapiValue for Float64Array

source§

impl ToNapiValue for Int8Array

source§

impl ToNapiValue for Int16Array

source§

impl ToNapiValue for Int32Array

source§

impl ToNapiValue for JsError

source§

impl ToNapiValue for Null

source§

impl ToNapiValue for Symbol

source§

impl ToNapiValue for Uint8Array

source§

impl ToNapiValue for Uint8ClampedArray

source§

impl ToNapiValue for Uint16Array

source§

impl ToNapiValue for Uint32Array

source§

impl ToNapiValue for Utf16String

source§

impl ToNapiValue for i64n

source§

impl ToNapiValue for Undefined

source§

impl<A, B> ToNapiValue for Either<A, B>where A: ToNapiValue, B: ToNapiValue,

source§

impl<A, B, C> ToNapiValue for Either3<A, B, C>where A: ToNapiValue, B: ToNapiValue, C: ToNapiValue,

source§

impl<A, B, C, D> ToNapiValue for Either4<A, B, C, D>where A: ToNapiValue, B: ToNapiValue, C: ToNapiValue, D: ToNapiValue,

source§

impl<A, B, C, D, E> ToNapiValue for Either5<A, B, C, D, E>where A: ToNapiValue, B: ToNapiValue, C: ToNapiValue, D: ToNapiValue, E: ToNapiValue,

source§

impl<A, B, C, D, E, F> ToNapiValue for Either6<A, B, C, D, E, F>where A: ToNapiValue, B: ToNapiValue, C: ToNapiValue, D: ToNapiValue, E: ToNapiValue, F: ToNapiValue,

source§

impl<A, B, C, D, E, F, G> ToNapiValue for Either7<A, B, C, D, E, F, G>where A: ToNapiValue, B: ToNapiValue, C: ToNapiValue, D: ToNapiValue, E: ToNapiValue, F: ToNapiValue, G: ToNapiValue,

source§

impl<A, B, C, D, E, F, G, H> ToNapiValue for Either8<A, B, C, D, E, F, G, H>where A: ToNapiValue, B: ToNapiValue, C: ToNapiValue, D: ToNapiValue, E: ToNapiValue, F: ToNapiValue, G: ToNapiValue, H: ToNapiValue,

source§

impl<A, B, C, D, E, F, G, H, I> ToNapiValue for Either9<A, B, C, D, E, F, G, H, I>where A: ToNapiValue, B: ToNapiValue, C: ToNapiValue, D: ToNapiValue, E: ToNapiValue, F: ToNapiValue, G: ToNapiValue, H: ToNapiValue, I: ToNapiValue,

source§

impl<A, B, C, D, E, F, G, H, I, J> ToNapiValue for Either10<A, B, C, D, E, F, G, H, I, J>where A: ToNapiValue, B: ToNapiValue, C: ToNapiValue, D: ToNapiValue, E: ToNapiValue, F: ToNapiValue, G: ToNapiValue, H: ToNapiValue, I: ToNapiValue, J: ToNapiValue,

source§

impl<A, B, C, D, E, F, G, H, I, J, K> ToNapiValue for Either11<A, B, C, D, E, F, G, H, I, J, K>where A: ToNapiValue, B: ToNapiValue, C: ToNapiValue, D: ToNapiValue, E: ToNapiValue, F: ToNapiValue, G: ToNapiValue, H: ToNapiValue, I: ToNapiValue, J: ToNapiValue, K: ToNapiValue,

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> ToNapiValue for Either12<A, B, C, D, E, F, G, H, I, J, K, L>where A: ToNapiValue, B: ToNapiValue, C: ToNapiValue, D: ToNapiValue, E: ToNapiValue, F: ToNapiValue, G: ToNapiValue, H: ToNapiValue, I: ToNapiValue, J: ToNapiValue, K: ToNapiValue, L: ToNapiValue,

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M> ToNapiValue for Either13<A, B, C, D, E, F, G, H, I, J, K, L, M>where A: ToNapiValue, B: ToNapiValue, C: ToNapiValue, D: ToNapiValue, E: ToNapiValue, F: ToNapiValue, G: ToNapiValue, H: ToNapiValue, I: ToNapiValue, J: ToNapiValue, K: ToNapiValue, L: ToNapiValue, M: ToNapiValue,

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N> ToNapiValue for Either14<A, B, C, D, E, F, G, H, I, J, K, L, M, N>where A: ToNapiValue, B: ToNapiValue, C: ToNapiValue, D: ToNapiValue, E: ToNapiValue, F: ToNapiValue, G: ToNapiValue, H: ToNapiValue, I: ToNapiValue, J: ToNapiValue, K: ToNapiValue, L: ToNapiValue, M: ToNapiValue, N: ToNapiValue,

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> ToNapiValue for Either15<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>where A: ToNapiValue, B: ToNapiValue, C: ToNapiValue, D: ToNapiValue, E: ToNapiValue, F: ToNapiValue, G: ToNapiValue, H: ToNapiValue, I: ToNapiValue, J: ToNapiValue, K: ToNapiValue, L: ToNapiValue, M: ToNapiValue, N: ToNapiValue, O: ToNapiValue,

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> ToNapiValue for Either16<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>where A: ToNapiValue, B: ToNapiValue, C: ToNapiValue, D: ToNapiValue, E: ToNapiValue, F: ToNapiValue, G: ToNapiValue, H: ToNapiValue, I: ToNapiValue, J: ToNapiValue, K: ToNapiValue, L: ToNapiValue, M: ToNapiValue, N: ToNapiValue, O: ToNapiValue, P: ToNapiValue,

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q> ToNapiValue for Either17<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q>where A: ToNapiValue, B: ToNapiValue, C: ToNapiValue, D: ToNapiValue, E: ToNapiValue, F: ToNapiValue, G: ToNapiValue, H: ToNapiValue, I: ToNapiValue, J: ToNapiValue, K: ToNapiValue, L: ToNapiValue, M: ToNapiValue, N: ToNapiValue, O: ToNapiValue, P: ToNapiValue, Q: ToNapiValue,

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R> ToNapiValue for Either18<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R>where A: ToNapiValue, B: ToNapiValue, C: ToNapiValue, D: ToNapiValue, E: ToNapiValue, F: ToNapiValue, G: ToNapiValue, H: ToNapiValue, I: ToNapiValue, J: ToNapiValue, K: ToNapiValue, L: ToNapiValue, M: ToNapiValue, N: ToNapiValue, O: ToNapiValue, P: ToNapiValue, Q: ToNapiValue, R: ToNapiValue,

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S> ToNapiValue for Either19<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S>where A: ToNapiValue, B: ToNapiValue, C: ToNapiValue, D: ToNapiValue, E: ToNapiValue, F: ToNapiValue, G: ToNapiValue, H: ToNapiValue, I: ToNapiValue, J: ToNapiValue, K: ToNapiValue, L: ToNapiValue, M: ToNapiValue, N: ToNapiValue, O: ToNapiValue, P: ToNapiValue, Q: ToNapiValue, R: ToNapiValue, S: ToNapiValue,

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T> ToNapiValue for Either20<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T>where A: ToNapiValue, B: ToNapiValue, C: ToNapiValue, D: ToNapiValue, E: ToNapiValue, F: ToNapiValue, G: ToNapiValue, H: ToNapiValue, I: ToNapiValue, J: ToNapiValue, K: ToNapiValue, L: ToNapiValue, M: ToNapiValue, N: ToNapiValue, O: ToNapiValue, P: ToNapiValue, Q: ToNapiValue, R: ToNapiValue, S: ToNapiValue, T: ToNapiValue,

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U> ToNapiValue for Either21<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U>where A: ToNapiValue, B: ToNapiValue, C: ToNapiValue, D: ToNapiValue, E: ToNapiValue, F: ToNapiValue, G: ToNapiValue, H: ToNapiValue, I: ToNapiValue, J: ToNapiValue, K: ToNapiValue, L: ToNapiValue, M: ToNapiValue, N: ToNapiValue, O: ToNapiValue, P: ToNapiValue, Q: ToNapiValue, R: ToNapiValue, S: ToNapiValue, T: ToNapiValue, U: ToNapiValue,

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V> ToNapiValue for Either22<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V>where A: ToNapiValue, B: ToNapiValue, C: ToNapiValue, D: ToNapiValue, E: ToNapiValue, F: ToNapiValue, G: ToNapiValue, H: ToNapiValue, I: ToNapiValue, J: ToNapiValue, K: ToNapiValue, L: ToNapiValue, M: ToNapiValue, N: ToNapiValue, O: ToNapiValue, P: ToNapiValue, Q: ToNapiValue, R: ToNapiValue, S: ToNapiValue, T: ToNapiValue, U: ToNapiValue, V: ToNapiValue,

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W> ToNapiValue for Either23<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W>where A: ToNapiValue, B: ToNapiValue, C: ToNapiValue, D: ToNapiValue, E: ToNapiValue, F: ToNapiValue, G: ToNapiValue, H: ToNapiValue, I: ToNapiValue, J: ToNapiValue, K: ToNapiValue, L: ToNapiValue, M: ToNapiValue, N: ToNapiValue, O: ToNapiValue, P: ToNapiValue, Q: ToNapiValue, R: ToNapiValue, S: ToNapiValue, T: ToNapiValue, U: ToNapiValue, V: ToNapiValue, W: ToNapiValue,

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X> ToNapiValue for Either24<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X>where A: ToNapiValue, B: ToNapiValue, C: ToNapiValue, D: ToNapiValue, E: ToNapiValue, F: ToNapiValue, G: ToNapiValue, H: ToNapiValue, I: ToNapiValue, J: ToNapiValue, K: ToNapiValue, L: ToNapiValue, M: ToNapiValue, N: ToNapiValue, O: ToNapiValue, P: ToNapiValue, Q: ToNapiValue, R: ToNapiValue, S: ToNapiValue, T: ToNapiValue, U: ToNapiValue, V: ToNapiValue, W: ToNapiValue, X: ToNapiValue,

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y> ToNapiValue for Either25<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y>where A: ToNapiValue, B: ToNapiValue, C: ToNapiValue, D: ToNapiValue, E: ToNapiValue, F: ToNapiValue, G: ToNapiValue, H: ToNapiValue, I: ToNapiValue, J: ToNapiValue, K: ToNapiValue, L: ToNapiValue, M: ToNapiValue, N: ToNapiValue, O: ToNapiValue, P: ToNapiValue, Q: ToNapiValue, R: ToNapiValue, S: ToNapiValue, T: ToNapiValue, U: ToNapiValue, V: ToNapiValue, W: ToNapiValue, X: ToNapiValue, Y: ToNapiValue,

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z> ToNapiValue for Either26<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z>where A: ToNapiValue, B: ToNapiValue, C: ToNapiValue, D: ToNapiValue, E: ToNapiValue, F: ToNapiValue, G: ToNapiValue, H: ToNapiValue, I: ToNapiValue, J: ToNapiValue, K: ToNapiValue, L: ToNapiValue, M: ToNapiValue, N: ToNapiValue, O: ToNapiValue, P: ToNapiValue, Q: ToNapiValue, R: ToNapiValue, S: ToNapiValue, T: ToNapiValue, U: ToNapiValue, V: ToNapiValue, W: ToNapiValue, X: ToNapiValue, Y: ToNapiValue, Z: ToNapiValue,

source§

impl<S: AsRef<str>> ToNapiValue for Error<S>

source§

impl<T> ToNapiValue for Result<T>where T: ToNapiValue,

source§

impl<T: 'static> ToNapiValue for External<T>

source§

impl<T: 'static> ToNapiValue for Reference<T>

source§

impl<T: 'static> ToNapiValue for WeakReference<T>

source§

impl<T: 'static, S: 'static> ToNapiValue for SharedReference<T, S>

source§

impl<T: NapiRaw> ToNapiValue for T

source§

impl<T: Task> ToNapiValue for AsyncTask<T>