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]>
toString
.- Just like
hex2bytes
but to a fixed length array. - Just like
hex2array
but without the checking. AsRef<[u8]>
toVec<u8>
.- Just like
hex2bytes
but without checking. AsRef<[u8]>
to&[u8]
.- 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<[u8]>
toT
directly, whereT: From<Vec<u8>>
. - Just like
hex_into
but without the checking. - Try to convert
AsRef<[u8]>
toT
directly, whereT: 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; N]
.- 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
- The main result of array-bytes.