pub trait FromNapiValue: Sized {
    // Required method
    unsafe fn from_napi_value(
        env: napi_env,
        napi_val: napi_value
    ) -> Result<Self>;

    // Provided method
    fn from_unknown(value: JsUnknown) -> Result<Self> { ... }
}

Required Methods§

source

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

§Safety

this function called to convert napi values to native rust values

Provided Methods§

source

fn from_unknown(value: JsUnknown) -> Result<Self>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl FromNapiValue for &str

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for &[f32]

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for &[f64]

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for &[i8]

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for &[i16]

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for &[i32]

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for &[i64]

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for &[u8]

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for &[u16]

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for &[u32]

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for &[u64]

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for &mut [f32]

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for &mut [f64]

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for &mut [i8]

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for &mut [i16]

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for &mut [i32]

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for &mut [i64]

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for &mut [u8]

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for &mut [u16]

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for &mut [u32]

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for &mut [u64]

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for Value

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for bool

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for f64

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for i8

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for i16

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for i32

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for i64

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for u8

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for u16

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for u32

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for String

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for DateTime<Utc>

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for NaiveDateTime

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for Map<String, Value>

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl FromNapiValue for Number

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl<K, V> FromNapiValue for BTreeMap<K, V>
where K: From<String> + Ord, V: FromNapiValue,

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl<K, V, S> FromNapiValue for HashMap<K, V, S>

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl<K, V, S> FromNapiValue for IndexMap<K, V, S>

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl<T0, T1> FromNapiValue for (T0, T1)

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl<T0, T1, T2> FromNapiValue for (T0, T1, T2)

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl<T0, T1, T2, T3> FromNapiValue for (T0, T1, T2, T3)

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl<T0, T1, T2, T3, T4> FromNapiValue for (T0, T1, T2, T3, T4)

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl<T0, T1, T2, T3, T4, T5> FromNapiValue for (T0, T1, T2, T3, T4, T5)

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6> FromNapiValue for (T0, T1, T2, T3, T4, T5, T6)

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7> FromNapiValue for (T0, T1, T2, T3, T4, T5, T6, T7)

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> FromNapiValue for (T0, T1, T2, T3, T4, T5, T6, T7, T8)

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> FromNapiValue for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> FromNapiValue for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> FromNapiValue for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> FromNapiValue for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> FromNapiValue for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> FromNapiValue for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> FromNapiValue for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

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

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl<T> FromNapiValue for Rc<T>
where T: FromNapiValue,

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl<T> FromNapiValue for Arc<T>
where T: FromNapiValue,

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

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

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

source§

impl<T> FromNapiValue for Mutex<T>
where T: FromNapiValue,

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

Implementors§

source§

impl FromNapiValue for JSON

source§

impl FromNapiValue for UnknownReturnValue

source§

impl FromNapiValue for Latin1String

source§

impl FromNapiValue for AbortSignal

source§

impl FromNapiValue for Array

source§

impl FromNapiValue for BigInt64Array

source§

impl FromNapiValue for BigInt

source§

impl FromNapiValue for BigUint64Array

source§

impl FromNapiValue for Buffer

source§

impl FromNapiValue for Float32Array

source§

impl FromNapiValue for Float64Array

source§

impl FromNapiValue for Int8Array

source§

impl FromNapiValue for Int16Array

source§

impl FromNapiValue for Int32Array

source§

impl FromNapiValue for Null

source§

impl FromNapiValue for Symbol

source§

impl FromNapiValue for Uint8Array

source§

impl FromNapiValue for Uint8ClampedArray

source§

impl FromNapiValue for Uint16Array

source§

impl FromNapiValue for Uint32Array

source§

impl FromNapiValue for Utf16String

source§

impl FromNapiValue for Undefined

source§

impl<'scope> FromNapiValue for BufferSlice<'scope>

source§

impl<'scope> FromNapiValue for Uint8ClampedSlice<'scope>

source§

impl<'scope, Args: JsValuesTupleIntoVec, Return: FromNapiValue> FromNapiValue for Function<'scope, Args, Return>

source§

impl<A, B> FromNapiValue for Either<A, B>

source§

impl<A, B, C> FromNapiValue for Either3<A, B, C>

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<A, B, C, D, E, F, G, H, I, J> FromNapiValue 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> FromNapiValue 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> FromNapiValue 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> FromNapiValue 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> FromNapiValue 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> FromNapiValue 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> FromNapiValue 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> FromNapiValue 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> FromNapiValue 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> FromNapiValue 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> FromNapiValue 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> FromNapiValue 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> FromNapiValue 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> FromNapiValue 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> FromNapiValue 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> FromNapiValue 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> FromNapiValue 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<Args: JsValuesTupleIntoVec, Return: FromNapiValue> FromNapiValue for FunctionRef<Args, Return>

source§

impl<T: 'static> FromNapiValue for ClassInstance<T>

source§

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

source§

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

source§

impl<T: NapiValue> FromNapiValue for T

source§

impl<T: FromNapiValue> FromNapiValue for Promise<T>

source§

impl<T: JsValuesTupleIntoVec + 'static, ES: T> FromNapiValue for ThreadsafeFunction<T, ES>