[][src]Struct r1cs::BooleanExpression

pub struct BooleanExpression<F: Field> { /* fields omitted */ }

An Expression whose value is known to be binary.

Methods

impl<F: Field> BooleanExpression<F>[src]

pub fn new_unsafe(expression: Expression<F>) -> Self[src]

Create a new bit. This is unsafe in the sense that a "equals 0 or 1" assertion will not be added automatically. You can use this method if you already know that a quantity will equal 0 or 1, for example if you computed 1 - b where b is a Bit.

pub fn _false() -> Self[src]

pub fn _true() -> Self[src]

pub fn expression(&self) -> &Expression<F>[src]

pub fn dependencies(&self) -> Vec<Wire>[src]

pub fn evaluate(&self, values: &WireValues<F>) -> bool[src]

Trait Implementations

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

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

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

impl<F: Field> Clone for BooleanExpression<F>[src]

impl<F: Field> Debug for BooleanExpression<F>[src]

Auto Trait Implementations

impl<F> !Send for BooleanExpression<F>

impl<F> !Sync for BooleanExpression<F>

impl<F> Unpin for BooleanExpression<F>

impl<F> UnwindSafe for BooleanExpression<F> where
    F: RefUnwindSafe

impl<F> RefUnwindSafe for BooleanExpression<F> where
    F: RefUnwindSafe

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]