pub trait Operation<N: Network, Value: Parser + ToBits, ValueType: Parser, const NUM_OPERANDS: usize> {
const OPCODE: Opcode;
// Required methods
fn evaluate(inputs: &[Value; NUM_OPERANDS]) -> Result<Value>;
fn execute<A: Aleo<Network = N>>(
inputs: &[Literal<A>; NUM_OPERANDS]
) -> Result<Literal<A>>;
fn output_type(inputs: &[ValueType; NUM_OPERANDS]) -> Result<ValueType>;
}
Required Associated Constants§
Required Methods§
sourcefn evaluate(inputs: &[Value; NUM_OPERANDS]) -> Result<Value>
fn evaluate(inputs: &[Value; NUM_OPERANDS]) -> Result<Value>
Returns the result of evaluating the operation on the given inputs.
sourcefn execute<A: Aleo<Network = N>>(
inputs: &[Literal<A>; NUM_OPERANDS]
) -> Result<Literal<A>>
fn execute<A: Aleo<Network = N>>( inputs: &[Literal<A>; NUM_OPERANDS] ) -> Result<Literal<A>>
Returns the result of executing the operation on the given circuit inputs.
sourcefn output_type(inputs: &[ValueType; NUM_OPERANDS]) -> Result<ValueType>
fn output_type(inputs: &[ValueType; NUM_OPERANDS]) -> Result<ValueType>
Returns the output type from the given input types.
Object Safety§
This trait is not object safe.