[][src]Trait leo_core::types::core_circuit::CoreCircuit

pub trait CoreCircuit {
    pub fn name() -> String;
pub fn ast(circuit_name: Identifier, span: Span) -> Circuit;
pub fn call<F: Field + PrimeField, CS: ConstraintSystem<F>>(
        cs: CS,
        arguments: Vec<Value>,
        span: Span
    ) -> Result<Vec<Value>, CoreCircuitError>; }

A core circuit type, accessible to all Leo programs by default. To access a CoreCircuit, import its symbol from a CorePackage.

Required methods

pub fn name() -> String[src]

The name of the core circuit function

pub fn ast(circuit_name: Identifier, span: Span) -> Circuit[src]

Return the abstract syntax tree representation of the core circuit for compiler parsing.

pub fn call<F: Field + PrimeField, CS: ConstraintSystem<F>>(
    cs: CS,
    arguments: Vec<Value>,
    span: Span
) -> Result<Vec<Value>, CoreCircuitError>
[src]

Call the gadget associated with this core circuit with arguments. Generate constraints on the given ConstraintSystem.

Loading content...

Implementors

impl CoreCircuit for Blake2sCircuit[src]

pub fn call<F: Field + PrimeField, CS: ConstraintSystem<F>>(
    mut cs: CS,
    arguments: Vec<Value>,
    span: Span
) -> Result<Vec<Value>, CoreCircuitError>
[src]

Calls the native Blake2sGadget on the given constraint system with the given arguments

Loading content...