Crate tauriless_serde

Source
Expand description

§tauriless_serde

Crates.io Downloads Documentation License

Implementation details of serialization and deserialization of messages for tauriless.

§Testing

The tests are written with wasm-bindgen-test to avoid cannot call wasm-bindgen imported functions on non-wasm targets error when dealing with wasm_bindgen::JsValue.

wasm-pack test --node

Modules§

serialize_to_vec_u8
The dedicated module for the serialize_to_vec_u8() function.
slice_to_deserialize
The dedicated module for the slice_to_deserialize() function.
vec_to_js_value
The dedicated module for the vec_to_js_value() function.

Functions§

js_value_to_vec_u8
A function for tauriless-js to deserialize a wasm_bindgen::JsValue into a Vec<u8> that represents it.
serialize_to_vec_u8
A function for the custom protocol handler to serialize a value implementing serde::Serialize into a Vec<u8>.
slice_to_deserialize
A function for the custom protocol handler to deserialize a &[u8] into a type implementing serde::Deserialize.
vec_to_js_value
A function for tauriless-js to serialize a Vec<u8> into a wasm_bindgen::JsValue.