Skip to main content

try_js_value_vector_from_abi

Function try_js_value_vector_from_abi 

Source
pub unsafe fn try_js_value_vector_from_abi<T: TryFromJsValue>(
    js: <Box<[JsValue]> as FromWasmAbi>::Abi,
) -> Result<Box<[T]>, &'static str>
Expand description

The fallible form of js_value_vector_from_abi.

Collecting stops at the first element of the wrong type and drops everything Rust owns: the buffer, the handles not yet converted, the rejected handle and the elements converted so far.

§⚠️ Unstable

This is part of the internal convert module, no stability guarantees are provided. Use at your own risk. See its documentation for more details.