Re-exports
pub use snarkvm_fields::Field as _;pub use snarkvm_fields::PrimeField as _;pub use snarkvm_fields::SquareRootField as _;pub use snarkvm_fields::Zero as _;pub use snarkvm_utilities::FromBits as _;pub use snarkvm_utilities::ToBits as _;pub use core::hash::Hash as _;pub use core::hash::Hash as _;pub use bech32;pub use super::*;Modules
Generic data structure deserialization framework.
Utilities for formatting and printing strings.
Generic data structure serialization framework.
String manipulation.
Macros
Derive macro generating an impl of the trait
Debug.Construct an ad-hoc error from a string or existing non-
anyhow error
value.Return early with an error.
Creates parallel iterator if
parallel feature is enabled.Creates parallel iterator over refs if
parallel feature is enabled.Creates parallel iterator over mut refs if
parallel feature is enabled.Structs
Sample a
u8, uniformly distributed over ASCII letters and numbers:
a-z, A-Z and 0-9.The
Error type, a wrapper around a dynamic error type.Configuration for formatting.
A generic random value distribution, implemented for many primitive types.
Usually generates values with a numerically uniform distribution, and with a
range appropriate to the type.
A fast RNG used solely for testing and benchmarking, not for any real world purposes.
Enums
An
Ordering is the result of a comparison between two values.Traits
The addition operator
+.The addition assignment operator
+=.Affine representation of an elliptic curve point guaranteed to be
in the correct prime order subgroup.
The bitwise AND operator
&.The bitwise AND assignment operator
&=.The bitwise OR operator
|.The bitwise OR assignment operator
|=.The bitwise XOR operator
^.The bitwise XOR assignment operator
^=.A marker trait used to indicate that an
RngCore or BlockRngCore
implementation is supposed to be cryptographically secure.? formatting.Used for immutable dereferencing operations, like
*v.Used for mutable dereferencing operations, like in
*v = 1;.A data structure that can be deserialized from any data format supported
by Serde.
A data structure that can be deserialized without borrowing any data from
the deserializer.
A data format that can deserialize any data structure supported by
Serde.
Format trait for an empty format,
{}.Types (distributions) that can be used to create a random instance of
T.The division operator
/.The division assignment operator
/=.Parse/convert base32 slice to
Self. It is the reciprocal of
ToBase32.Parse a value from a string
The multiplication operator
*.The multiplication assignment operator
*=.The unary negation operator
-.The unary logical negation operator
!.Defines a multiplicative identity element for
Self.Binary operator for raising a value to a power.
Trait to represent types that can be created by multiplying elements of an
iterator.
Projective representation of an elliptic curve point guaranteed to be in the prime order subgroup.
The
Read trait allows for reading bytes from a source.The remainder operator
%.The remainder assignment operator
%=.An automatically-implemented extension trait on
RngCore providing high-level
generic methods for sampling values and other convenience methods.A data structure that can be serialized into any data format supported
by Serde.
Returned from
Serializer::serialize_seq.Returned from
Serializer::serialize_struct.A data format that can serialize any data structure supported by Serde.
The left shift operator
<<. Note that because this trait is implemented
for all integer types with multiple right-hand-side types, Rust’s type
checker has special handling for _ << _, setting the result type for
integer operations to the type of the left-hand-side operand. This means
that though a << b and a.shl(b) are one and the same from an evaluation
standpoint, they are different when it comes to type inference.The left shift assignment operator
<<=.The right shift operator
>>. Note that because this trait is implemented
for all integer types with multiple right-hand-side types, Rust’s type
checker has special handling for _ >> _, setting the result type for
integer operations to the type of the left-hand-side operand. This means
that though a >> b and a.shr(b) are one and the same from an evaluation
standpoint, they are different when it comes to type inference.The right shift assignment operator
>>=.The subtraction operator
-.The subtraction assignment operator
-=.Trait to represent types that can be created by summing up an iterator.
A trait for converting a value to a type
T that represents a u5 slice.A trait for a uniform random number generator.
A trait for objects which are byte-oriented sinks.
Defines an additive identity element for
Self.Functions
Recognizes one or more lowercase and uppercase ASCII alphabetic characters: a-z, A-Z
Recognizes one or more ASCII numerical and alphabetic characters: 0-9, a-z, A-Z
Tests a list of parsers one by one until one succeeds.
Recognizes one character.
Transforms Incomplete into
Error.Returns true if the given iterator has duplicate elements.
Repeats the embedded parser until it fails
and returns the results in a
Vec.Runs the embedded parser until it fails and
returns the results in a
Vec. Fails if
the embedded parser does not produce at least
one result.Maps a function on the result of a parser.
Applies a function returning a
Result over the result of a parser.Recognizes one of the provided characters.
Optional parser: Will return
None if not successful.Gets an object from the first parser,
then gets another object from the second parser.
If the child parser was successful, return the consumed input as produced value.
Alternates between two parsers to produce
a list of elements.
Alternates between two parsers to produce
a list of elements. Fails if the element
parser does not produce at least one element.
Recognizes a pattern
Returns an input slice containing the first N input elements (Input[..N]).
Gets an object from the first parser,
then matches an object from the second parser and discards it.