Re-exports§

Modules§

Macros§

  • Construct an ad-hoc error from a string or existing non-anyhow error value.
  • Return early with an error.
  • Returns an iterator over chunk_size elements of the slice at a time.
  • Finds the first element that satisfies the predicate function
  • Applies a function and returns the first value that is not None
  • 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.
  • Applies the reduce operation over an iterator.
  • Turns a collection into an iterator.
  • Takes as input a sequence of objects, and converts them to a series of little-endian bits. All traits that implement ToBits can be automatically converted to bits in this manner.

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.
  • The sponge construction Sponge[f, pad, r] is a function that takes a variable-length input and produces a fixed-length output (the hash value).
  • Pedersen is a collision-resistant hash function that takes a variable-length input. The Pedersen hash function does not behave like a random oracle, see Poseidon for one.
  • 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§

  • Unary operator for retrieving the absolute value, enforcing an overflow never occurs.
  • Unary operator for retrieving the absolute value, bounding the difference to MAX if an overflow occurs.
  • Unary operator for retrieving the absolute value, wrapping the result if an overflow occurs.
  • The addition operator +.
  • The addition assignment operator +=.
  • Binary operator for adding two values, enforcing an overflow never occurs.
  • Binary operator for adding two values, bounding the sum to MAX if an overflow occurs.
  • Binary operator for adding two values, wrapping the sum if an overflow occurs.
  • Representation of an address.
  • Affine representation of an elliptic curve point guaranteed to be in the correct prime order subgroup.
  • A generic interface for casting between machine scalars with the as operator, which admits narrowing and precision loss. Implementers of this trait AsPrimitive should behave like a primitive numeric type (e.g. a newtype around another primitive), and the intended conversion must never fail.
  • 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 ^=.
  • Representation of a boolean.
  • A trait for a commitment scheme.
  • A trait for a commitment scheme.
  • Trait for comparator operations.
  • 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 helper trait used to simplify value extraction.
  • 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 /=.
  • Binary operator for dividing two values, enforcing an overflow never occurs.
  • Binary operator for dividing two values, bounding the quotient to MAX or MIN if an overflow occurs.
  • Binary operator for dividing two values, without checking specific conditions.
  • Binary operator for dividing two values, wrapping the quotient if an overflow occurs.
  • Unary operator for retrieving the doubled value.
  • Trait for equality comparisons.
  • Representation of a base field element.
  • Parse/convert base32 slice to Self. It is the reciprocal of ToBase32.
  • Unary operator for converting from a base field element.
  • Unary operator for converting from a list of base elements.
  • Parse a value from a string
  • Representation of a group element.
  • A trait for a hash function.
  • A trait for a hash function that produces multiple outputs.
  • A trait for a hash function that projects the value to an affine group element.
  • A trait for a hash function that projects the value to a scalar.
  • A trait for a hash function of an uncompressed variant.
  • Properties common to all integer types.
  • Representation of an integer.
  • Trait bound for integer values. Common to both signed and unsigned integers.
  • Unary operator for retrieving the inverse value.
  • An Iterator blanket implementation that provides extra adaptors and methods.
  • Trait for integers that can be used as an unsigned magnitude. Magnitudes are either used to represent an integer exponent or the right operand in integer shift operations.
  • Binary operator for modding two values.
  • The multiplication operator *.
  • The multiplication assignment operator *=.
  • Binary operator for multiplying two values, enforcing an overflow never occurs.
  • Binary operator for multiplying two values, bounding the product to MAX if an overflow occurs.
  • Binary operator for multiplying two values, wrapping the product if an overflow occurs.
  • Binary operator for performing NOT (a AND b).
  • The unary negation operator -.
  • Binary operator for performing (NOT a) AND (NOT b).
  • The unary logical negation operator !.
  • Defines a multiplicative identity element for Self.
  • A trait to unwrap a Result or Halt.
  • A trait for a pseudorandom function.
  • Operations to parse a string literal into an object.
  • Binary operator for raising a value to a power.
  • Binary operator for exponentiating two values, enforcing an overflow never occurs.
  • Binary operator for exponentiating two values, wrapping the result if an overflow occurs.
  • 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 %=.
  • Binary operator for dividing two values and returning the remainder, enforcing an overflow never occurs.
  • Binary operator for dividing two values, bounding the remainder to MAX or MIN if an overflow occurs.
  • Binary operator for dividing two values, wrapping the remainder if an overflow occurs.
  • An automatically-implemented extension trait on RngCore providing high-level generic methods for sampling values and other convenience methods.
  • Representation of a scalar field element.
  • Provides a Visitor access to each element of a sequence in the input.
  • 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 <<=.
  • Binary operator for left shifting a value, checking that the rhs is less than the number of bits in self.
  • Binary operator for left shifting a value, safely continuing past the number of bits in self.
  • 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 >>=.
  • Binary operator for right shifting a value, checking that the rhs is less than the number of bits in self.
  • Binary operator for right shifting a value, safely continuing past the number of bits in self.
  • Unary operator for retrieving the squared value.
  • Unary operator for retrieving the square root of the value.
  • Representation of a string.
  • The subtraction operator -.
  • The subtraction assignment operator -=.
  • Binary operator for subtracting two values, enforcing an underflow never occurs.
  • Binary operator for subtracting two values, bounding the difference to MIN if an underflow occurs.
  • Binary operator for subtracting two values, wrapping the difference if an underflow occurs.
  • Trait to represent types that can be created by summing up an iterator.
  • Trait for ternary operations.
  • A trait for converting a value to a type T that represents a u5 slice.
  • Unary operator for converting to a base field.
  • Unary operator for converting to a list of base fields.
  • A trait for a uniform random number generator.
  • This trait represents a visitor that walks through a deserializer.
  • A trait for objects which are byte-oriented sinks.
  • Defines an additive identity element for Self.
  • The interface for a generic field.

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.
  • Converts a ParserResult into a human-readable message.
  • Runs the embedded parser count times, gathering the results in a Vec
  • A parser which always fails.
  • Returns true if the given iterator has duplicate elements.
  • Repeats the embedded parser, gathering the results in a Vec.
  • Repeats the embedded parser, counting the results
  • Runs the embedded parser, gathering the results in a Vec.
  • 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 on [Err::Error].
  • Gets an object from the first parser, then gets another object from the second parser.
  • Decode the value of a variable length integer. https://en.bitcoin.it/wiki/Protocol_documentation#Variable_length_integer
  • 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 until [Err::Error].
  • 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.
  • Returns the variable length integer of the given value. https://en.bitcoin.it/wiki/Protocol_documentation#Variable_length_integer

Type Aliases§

Derive Macros§