Expand description
Utilities used in this crate which can also be generally useful downstream.
Modules§
- zeroize
- Securely zero memory with a simple trait (
Zeroize) built on stable Rust primitives which guarantee the operation will not be “optimized away”.
Structs§
- Budgeted
Reader - A reader wrapper that enforces a byte budget during deserialization.
- Read
Adapter - An adapter of ByteReader to any type that implements std::io::Read
- Slice
Reader - Implements ByteReader trait for a slice of bytes.
Enums§
- Deserialization
Error - Defines errors which can occur during deserialization.
- HexParse
Error - Defines errors which can occur during parsing of hexadecimal strings.
Traits§
- Byte
Reader - Defines how primitive values are to be read from
Self. - Byte
Writer - Defines how primitive values are to be written into
Self. - Deserializable
- Defines how to deserialize
Selffrom bytes. - Serializable
- Defines how to serialize
Selfinto bytes.
Functions§
- assume_
init_ ⚠vec - Converts a fully-initialized
Vec<MaybeUninit<T>>intoVec<T>. - bytes_
to_ elements_ exact - Converts bytes to field elements with validation.
- bytes_
to_ elements_ with_ padding - Converts a sequence of bytes into vector field elements with padding. This guarantees that no two sequences or bytes map to the same sequence of field elements.
- bytes_
to_ hex_ string - Renders an array of bytes as hex into a String.
- bytes_
to_ packed_ u32_ elements - Converts bytes to field elements using u32 packing in little-endian format.
- elements_
to_ bytes - Converts field elements to raw byte representation.
- flatten_
slice_ elements - Transmutes a slice of
narrays each of lengthN, into a slice ofN*nelements. - flatten_
vector_ elements - Transmutes a vector of
narrays each of lengthN, into a vector ofN*nelements. - group_
slice_ elements - Transmutes a slice of
nelements into a slice ofn/Nelements, each of which is an array ofNelements. - hex_
to_ bytes - Parses a hex string into an array of bytes of known size.
- padded_
elements_ to_ bytes - Converts a sequence of padded field elements back to the original bytes.
- transpose_
slice - Transposes a slice of
nelements into a matrix withNcolumns andn/Nrows. - uninit_
vector - Returns a vector of the specified length with un-initialized memory.
- word_
to_ hex - Converts a Word into hex.