Enum mcircuit::Operation[][src]

pub enum Operation<T: WireValue> {
    Input(usize),
    Random(usize),
    Add(usize, usize, usize),
    AddConst(usize, usize, T),
    Sub(usize, usize, usize),
    SubConst(usize, usize, T),
    Mul(usize, usize, usize),
    MulConst(usize, usize, T),
    AssertZero(usize),
    Const(usize, T),
}

Variants

Input

Read a value from input and emit it on the wire

Tuple Fields of Input

0: usize
Random

Emit a random value on the wire

Tuple Fields of Random

0: usize
Add

Tuple Fields of Add

0: usize1: usize2: usize
AddConst

Tuple Fields of AddConst

0: usize1: usize2: T
Sub

Subtract the final wire from the second wire

Tuple Fields of Sub

0: usize1: usize2: usize
SubConst

Tuple Fields of SubConst

0: usize1: usize2: T
Mul

Tuple Fields of Mul

0: usize1: usize2: usize
MulConst

Tuple Fields of MulConst

0: usize1: usize2: T
AssertZero

Assert that the wire has the const value zero

Tuple Fields of AssertZero

0: usize
Const

Emit the const value on the wire

Tuple Fields of Const

0: usize1: T

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Generate a random value of T, using rng as the source of randomness.

Create an iterator that generates random values of T, using rng as the source of randomness. Read more

Create a distribution of values of ‘S’ by mapping the output of Self through the closure F Read more

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.