[−][src]Module r1cs::bits
This module contains wrappers for Wire
s, Expression
s which designate them as boolean, i.e.,
equal to 0 or 1. Similarly, it contains wrappers for Wire
arrays and Expression
arrays which
designate them as binary, i.e., with each bit equal to 0 or 1.
The intention here is to provide a degree of type safety. If you write a function which takes a
BooleanExpression
input, the user could not accidentally pass in an unbound wire; they would
need to go through a method like assert_binary
which would constrain the input to equal 0 or
1.
Structs
BinaryExpression | A "binary expression" which is comprised of several bits, each one being a boolean expression. |
BinaryWire | A "binary wire" which is comprised of several bits, each one being a boolean wire. |
BooleanExpression | An |
BooleanWire | A |