Expand description
Serialization (and deserialization) of primitive unsigned integer types to (and from) an arbitrary fixed-length byte array.
Macrosยง
- bytes_
serde_ ๐impl - Impl
serde
for type$T
with methods named$to_bytes
,$from_bytes
of the form - uint_
bytes_ ๐impl
Functionsยง
- u32_
fits - Can
n
fit intobyte_len
bytes? - u32_
from_ bytes - Deserialize
bytes
in little-endian form into a$T
, padding with 0 as needed. - u32_
max_ from_ byte_ len - Return the largest
$T
value that can fit intobyte_len
bytes. - u32_
to_ bytes - Serialize
n
intoBYTE_LEN
bytes in little-endian form, padding with 0 as needed. - usize_
fits - Can
n
fit intobyte_len
bytes? - usize_
from_ bytes - Deserialize
bytes
in little-endian form into a$T
, padding with 0 as needed. - usize_
max_ from_ byte_ len - Return the largest
$T
value that can fit intobyte_len
bytes. - usize_
to_ bytes - Serialize
n
intoBYTE_LEN
bytes in little-endian form, padding with 0 as needed.