pub trait FromJsValue: Sized {
    type WasmAbi: FromWasmAbi;

    // Required methods
    fn from_js_value(value: &JsValue) -> Result<Self>;
    fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>;

    // Provided method
    fn from_fn_result(result: &Result<JsValue, JsValue>) -> Result<Self> { ... }
}

Required Associated Types§

Required Methods§

source

fn from_js_value(value: &JsValue) -> Result<Self>

source

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

Provided Methods§

Implementations on Foreign Types§

source§

impl FromJsValue for f64

§

type WasmAbi = f64

source§

fn from_js_value(value: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

impl<T: FromJsValue> FromJsValue for (T,)

source§

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

§

type WasmAbi = JsValue

source§

fn from_js_value(results: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

impl FromJsValue for char

§

type WasmAbi = char

source§

fn from_js_value(value: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

impl FromJsValue for u16

§

type WasmAbi = u16

source§

fn from_js_value(value: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

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

§

type WasmAbi = JsValue

source§

fn from_js_value(results: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

impl<T: FromJsValue> FromJsValue for Vec<T>

§

type WasmAbi = JsValue

source§

fn from_js_value(value: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

impl<T0: FromJsValue, T1: FromJsValue, T2: FromJsValue, T3: FromJsValue> FromJsValue for (T0, T1, T2, T3)

§

type WasmAbi = JsValue

source§

fn from_js_value(results: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

impl FromJsValue for String

§

type WasmAbi = String

source§

fn from_js_value(value: &JsValue) -> Result<Self, Error>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

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

§

type WasmAbi = JsValue

source§

fn from_js_value(results: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

impl<T: FromJsValue> FromJsValue for Option<T>

§

type WasmAbi = JsValue

source§

fn from_js_value(value: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

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

§

type WasmAbi = JsValue

source§

fn from_js_value(results: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

impl FromJsValue for i64

§

type WasmAbi = i64

source§

fn from_js_value(value: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

impl FromJsValue for i16

§

type WasmAbi = i16

source§

fn from_js_value(value: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

impl FromJsValue for i8

§

type WasmAbi = i8

source§

fn from_js_value(value: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

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

§

type WasmAbi = JsValue

source§

fn from_js_value(results: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

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

§

type WasmAbi = JsValue

source§

fn from_js_value(results: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

impl FromJsValue for f32

§

type WasmAbi = f32

source§

fn from_js_value(value: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

impl<T0: FromJsValue, T1: FromJsValue> FromJsValue for (T0, T1)

§

type WasmAbi = JsValue

source§

fn from_js_value(results: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

impl FromJsValue for i32

§

type WasmAbi = i32

source§

fn from_js_value(value: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

impl FromJsValue for bool

§

type WasmAbi = bool

source§

fn from_js_value(value: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

impl FromJsValue for ()

§

type WasmAbi = JsValue

source§

fn from_js_value(value: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(_abi: Self::WasmAbi) -> Result<Self>

source§

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

§

type WasmAbi = JsValue

source§

fn from_js_value(results: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

impl FromJsValue for u64

§

type WasmAbi = u64

source§

fn from_js_value(value: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

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

§

type WasmAbi = JsValue

source§

fn from_js_value(results: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

impl FromJsValue for u32

§

type WasmAbi = u32

source§

fn from_js_value(value: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

impl FromJsValue for u8

§

type WasmAbi = u8

source§

fn from_js_value(value: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

source§

impl<T0: FromJsValue, T1: FromJsValue, T2: FromJsValue> FromJsValue for (T0, T1, T2)

§

type WasmAbi = JsValue

source§

fn from_js_value(results: &JsValue) -> Result<Self>

source§

fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>

Implementors§