Expand description
Leverage common functionality across multiple primitives.
Re-exports§
pub use array::Array;
Modules§
Macros§
- NZU32
- A macro to create a
NonZeroU32
from a value, panicking if the value is zero. - NZU64
- A macro to create a
NonZeroU64
from a value, panicking if the value is zero. - NZUsize
- A macro to create a
NonZeroUsize
from a value, panicking if the value is zero.
Structs§
- BitIterator
- Iterator over bits in a BitVec
- BitVec
- Represents a vector of bits.
- Priority
Set - A set that offers efficient iteration over its elements in priority-ascending order.
Enums§
- Stable
Buf - A buffer whose memory is stable as long as its not reallocated.
Traits§
- System
Time Ext - Extension trait to add methods to
std::time::SystemTime
Functions§
- from_
hex - Converts a hexadecimal string to bytes.
- from_
hex_ formatted - Converts a hexadecimal string to bytes, stripping whitespace and/or a
0x
prefix. Commonly used in testing to encode external test vectors without modification. - hex
- Converts bytes to a hexadecimal string.
- max_
faults - Compute the maximum number of
f
(faults) that can be tolerated for a given set ofn
participants. This is the maximum integerf
such thatn >= 3*f + 1
.f
may be zero. - modulo
- Compute the modulo of bytes interpreted as a big-endian integer.
- quorum
- Compute the quorum size for a given set of
n
participants. This is the minimum integerq
such that3*q >= 2*n + 1
. It is also equal ton - f
, wheref
is the maximum number of faults. - union
- Computes the union of two byte slices.
- union_
unique - Concatenate a namespace and a message, prepended by a varint encoding of the namespace length.