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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ToNapiValue for &str

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 &Vec<bool>

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 &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 &Vec<i32>

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<u8>

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 &Vec<u32>

source§

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

source§

impl ToNapiValue for &Vec<String>

source§

unsafe fn to_napi_value(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 bool

source§

impl ToNapiValue for f32

source§

impl ToNapiValue for f64

source§

impl ToNapiValue for i8

source§

impl ToNapiValue for i16

source§

impl ToNapiValue for i32

source§

impl ToNapiValue for i64

source§

impl ToNapiValue for i128

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 u8

source§

impl ToNapiValue for u16

source§

impl ToNapiValue for u32

source§

impl ToNapiValue for u64

source§

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

source§

impl ToNapiValue for u128

source§

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

source§

impl ToNapiValue for usize

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 DateTime<Utc>

source§

impl ToNapiValue for NaiveDateTime

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 Number

source§

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

source§

impl ToNapiValue for napi_value

source§

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

source§

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

source§

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

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<K, V, S> ToNapiValue for IndexMap<K, V, S>
where K: AsRef<str>, V: ToNapiValue, S: Default + BuildHasher,

source§

unsafe fn to_napi_value(raw_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<T> ToNapiValue for Option<T>
where T: ToNapiValue,

source§

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

source§

impl<T> ToNapiValue for Rc<T>
where T: ToNapiValue + Clone,

source§

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

source§

impl<T> ToNapiValue for Arc<T>
where T: ToNapiValue + Clone,

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<T> ToNapiValue for Mutex<T>
where T: ToNapiValue + Clone,

source§

unsafe fn to_napi_value(env: napi_env, val: 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>

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 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 BufferSlice<'_>

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 JsRangeError

source§

impl ToNapiValue for JsSyntaxError

source§

impl ToNapiValue for JsTypeError

source§

impl ToNapiValue for Null

source§

impl ToNapiValue for Symbol

source§

impl ToNapiValue for Uint8Array

source§

impl ToNapiValue for Uint8ClampedArray

source§

impl ToNapiValue for Uint8ClampedSlice<'_>

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>

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>