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§
- Convert the given type to hex.
- Try to convert the given hex to a specific type.
Functions§
AsRef<[u8]>toString.- Just like
hex2bytesbut to a fixed length array. - Just like
hex2arraybut without the checking. AsRef<[u8]>toVec<u8>.- Just like
hex2bytesbut without checking. AsRef<[u8]>to&[u8].- Just like
hex2slicebut without checking. - Convert hex bytes to hex string.
- Just like
hex_bytes2hex_strbut without the checking. - Try to convert
AsRef<[u8]>toTdirectly, whereT: From<Vec<u8>>. - Just like
hex_intobut without the checking. - Try to convert
AsRef<[u8]>toTdirectly, whereT: From<[u8; N]>. - Just like
hex_n_intobut without the checking. - Prefixes the given element to the given array/slice/vector to make it a fixed-size array of length
N. &[T]to[T; N].&[T]to&[T; N].- Just like
slice2array_refbut without the checking. - Just like
slice2arraybut without the checking. - Convert
&[T]to a type directly. - Just like
slice_n_intobut without the checking. - Suffixes the given element to the given array/slice/vector to make it a fixed-size array of length
N. Vec<T>to[T; N].- Just like
vec2arraybut without the checking. - Convert
Vec<T>to a type directly. - Just like
vec_n_intobut without the checking.
Type Aliases§
- The main result of array-bytes.