Skip to main content

Module bytes

Module bytes 

Source
Expand description

Binary data for native modules: a Uint8Array in JS. #[serde(with = "skathi::bytes")] puts a Vec<u8> field in that form; #[skathi::data] does it for every Vec<u8> field.

Modules§

option
#[serde(with = "skathi::bytes::option", default)] for an Option<Vec<u8>>.

Structs§

Bytes
Bytes that reach JS as a Uint8Array, read from any ArrayBufferView, an ArrayBuffer or an array of numbers.

Functions§

deserialize
#[serde(with = "skathi::bytes")] for a Vec<u8>.
serialize
#[serde(with = "skathi::bytes")] for a Vec<u8>.