Crate environment

Source

Modules§

prelude
traits

Macros§

to_bits_le
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§

Console
Sanitizer

Traits§

AbsChecked
Unary operator for retrieving the absolute value, enforcing an overflow never occurs.
AbsSaturating
Unary operator for retrieving the absolute value, bounding the difference to MAX if an overflow occurs.
AbsWrapped
Unary operator for retrieving the absolute value, wrapping the result if an overflow occurs.
AddChecked
Binary operator for adding two values, enforcing an overflow never occurs.
AddSaturating
Binary operator for adding two values, bounding the sum to MAX if an overflow occurs.
AddWrapped
Binary operator for adding two values, wrapping the sum if an overflow occurs.
AddressTrait
Representation of an address.
BooleanTrait
Representation of a boolean.
CheckedPow
CheckedShl
Commit
A trait for a commitment scheme.
CommitUncompressed
A trait for a commitment scheme.
Compare
Trait for comparator operations.
DivChecked
Binary operator for dividing two values, enforcing an overflow never occurs.
DivSaturating
Binary operator for dividing two values, bounding the quotient to MAX or MIN if an overflow occurs.
DivUnchecked
Binary operator for dividing two values, without checking specific conditions.
DivWrapped
Binary operator for dividing two values, wrapping the quotient if an overflow occurs.
Double
Unary operator for retrieving the doubled value.
Environment
Equal
Trait for equality comparisons.
FieldTrait
Representation of a base field element.
FromBits
FromField
Unary operator for converting from a base field element.
FromFields
Unary operator for converting from a list of base elements.
GroupTrait
Representation of a group element.
Hash
A trait for a hash function.
HashMany
A trait for a hash function that produces multiple outputs.
HashToGroup
A trait for a hash function that projects the value to an affine group element.
HashToScalar
A trait for a hash function that projects the value to a scalar.
HashUncompressed
A trait for a hash function of an uncompressed variant.
IntegerCore
IntegerProperties
Properties common to all integer types.
IntegerTrait
Representation of an integer.
IntegerType
Trait bound for integer values. Common to both signed and unsigned integers.
Inverse
Unary operator for retrieving the inverse value.
Magnitude
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.
Modulo
Binary operator for modding two values.
MulChecked
Binary operator for multiplying two values, enforcing an overflow never occurs.
MulSaturating
Binary operator for multiplying two values, bounding the product to MAX if an overflow occurs.
MulWrapped
Binary operator for multiplying two values, wrapping the product if an overflow occurs.
Nand
Binary operator for performing NOT (a AND b).
Nor
Binary operator for performing (NOT a) AND (NOT b).
OrHalt
A trait to unwrap a Result or Halt.
PRF
A trait for a pseudorandom function.
Parser
Operations to parse a string literal into an object.
PowChecked
Binary operator for exponentiating two values, enforcing an overflow never occurs.
PowWrapped
Binary operator for exponentiating two values, wrapping the result if an overflow occurs.
RemChecked
Binary operator for dividing two values and returning the remainder, enforcing an overflow never occurs.
RemSaturating
Binary operator for dividing two values, bounding the remainder to MAX or MIN if an overflow occurs.
RemWrapped
Binary operator for dividing two values, wrapping the remainder if an overflow occurs.
ScalarTrait
Representation of a scalar field element.
ShlChecked
Binary operator for left shifting a value, checking that the rhs is less than the number of bits in self.
ShlWrapped
Binary operator for left shifting a value, safely continuing past the number of bits in self.
ShrChecked
Binary operator for right shifting a value, checking that the rhs is less than the number of bits in self.
ShrWrapped
Binary operator for right shifting a value, safely continuing past the number of bits in self.
SizeInBits
SizeInBytes
SizeInDataBits
Square
Unary operator for retrieving the squared value.
SquareRoot
Unary operator for retrieving the square root of the value.
StringTrait
Representation of a string.
SubChecked
Binary operator for subtracting two values, enforcing an underflow never occurs.
SubSaturating
Binary operator for subtracting two values, bounding the difference to MIN if an underflow occurs.
SubWrapped
Binary operator for subtracting two values, wrapping the difference if an underflow occurs.
Ternary
Trait for ternary operations.
ToBits
ToField
Unary operator for converting to a base field.
ToFields
Unary operator for converting to a list of base fields.
TypeName
Visibility
WrappingDiv
WrappingPow
WrappingRem

Functions§

convert_result
Converts a ParserResult into a human-readable message.
read_variable_length_integer
Decode the value of a variable length integer. https://en.bitcoin.it/wiki/Protocol_documentation#Variable_length_integer
variable_length_integer
Returns the variable length integer of the given value. https://en.bitcoin.it/wiki/Protocol_documentation#Variable_length_integer

Type Aliases§

ParserResult
The nom-compatible parser return type.