[][src]Struct r1cs::BooleanWire

pub struct BooleanWire {
    pub wire: Wire,
}

A Wire whose value is constrained to be binary.

Fields

wire: Wire

Methods

impl BooleanWire[src]

A Wire which has been constrained in such a way that it can only take on a value of 0 or 1.

pub fn new_unsafe(wire: Wire) -> Self[src]

Construct a BooleanWire from an arbitrary wire. This is only safe if you separately constrain the wire to equal 0 or 1.

Users should not normally call this method directly; use a method like GadgetBuilder::boolean_wire() instead.

pub fn wire(self) -> Wire[src]

Trait Implementations

impl<'_, F: Field> From<&'_ BooleanWire> for BooleanExpression<F>[src]

impl<F: Field> From<BooleanWire> for BooleanExpression<F>[src]

impl Clone for BooleanWire[src]

impl Copy for BooleanWire[src]

impl Eq for BooleanWire[src]

impl PartialEq<BooleanWire> for BooleanWire[src]

impl Debug for BooleanWire[src]

impl Hash for BooleanWire[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]