Crate array_bytes

source ·
Expand description

A collection of array/bytes/hex utilities.

Completely optimized for blockchain development. Especially the Substrate.

Enums

The main error of array-bytes.

Traits

Simple and safe T/AsRef<str> conversions that may fail in a controlled way under some circumstances.

Functions

AsRef<[u8]> to Hex.
Just like hex2bytes but to a fixed length array.
Just like hex2array but without the checking.
Just like hex2bytes but without checking.
Just like hex2slice but without checking.
Convert hex bytes to hex string.
Just like hex_bytes2hex_str but without the checking.
Try to convert AsRef<str> to T directly, where T: From<Vec<u8>>.
Just like hex_into but without the checking.
Try to convert AsRef<str> to T directly, where T: From<[u8; N]>.
Just like hex_n_into but without the checking.
&[T] to [T; N].
Just like slice2array but without the checking.
Convert &[T] to a type directly.
Just like slice_n_into but without the checking.
Vec<T> to [T; M].
Just like vec2array but without the checking.
Convert Vec<T> to a type directly.
Just like vec_n_into but without the checking.

Type Definitions

Alias for Vec<u8>.
Alias for String.
The main result of array-bytes.