pub trait Inject {
    type Primitive;

    // Required method
    fn new(mode: Mode, value: Self::Primitive) -> Self;

    // Provided method
    fn constant(value: Self::Primitive) -> Self
       where Self: Sized { ... }
}
Expand description

Operations to inject from a primitive form into a circuit environment.

Required Associated Types§

Required Methods§

source

fn new(mode: Mode, value: Self::Primitive) -> Self

Initializes a circuit of the given mode and primitive value.

Provided Methods§

source

fn constant(value: Self::Primitive) -> Selfwhere Self: Sized,

Initializes a constant of the given primitive value.

Implementations on Foreign Types§

source§

impl<C, P> Inject for Vec<C, Global>where C: Inject<Primitive = P>,

§

type Primitive = Vec<P, Global>

source§

fn new( mode: Mode, value: <Vec<C, Global> as Inject>::Primitive ) -> Vec<C, Global>

source§

impl<C0, C1, C2> Inject for (C0, C1, C2)where C0: Inject, C1: Inject, C2: Inject,

§

type Primitive = (<C0 as Inject>::Primitive, <C1 as Inject>::Primitive, <C2 as Inject>::Primitive)

source§

fn new(mode: Mode, value: <(C0, C1, C2) as Inject>::Primitive) -> (C0, C1, C2)

source§

impl<C0, C1, C2, C3, C4> Inject for (C0, C1, C2, C3, C4)where C0: Inject, C1: Inject, C2: Inject, C3: Inject, C4: Inject,

source§

impl<C0, C1, C2, C3> Inject for (C0, C1, C2, C3)where C0: Inject, C1: Inject, C2: Inject, C3: Inject,

§

type Primitive = (<C0 as Inject>::Primitive, <C1 as Inject>::Primitive, <C2 as Inject>::Primitive, <C3 as Inject>::Primitive)

source§

fn new( mode: Mode, value: <(C0, C1, C2, C3) as Inject>::Primitive ) -> (C0, C1, C2, C3)

source§

impl<C0, C1> Inject for (C0, C1)where C0: Inject, C1: Inject,

§

type Primitive = (<C0 as Inject>::Primitive, <C1 as Inject>::Primitive)

source§

fn new(mode: Mode, value: <(C0, C1) as Inject>::Primitive) -> (C0, C1)

source§

impl<E, I> Inject for Integer<E, I>where E: Environment, I: IntegerType,

source§

fn new(mode: Mode, value: <Integer<E, I> as Inject>::Primitive) -> Integer<E, I>

Initializes a new integer.

§

type Primitive = Integer<<E as Environment>::Network, I>

Implementors§

source§

impl<C0, C1, P0, P1> Inject for IndexMap<C0, C1, RandomState>where C0: Eq + Hash + Inject<Primitive = P0>, C1: Inject<Primitive = P1>,

source§

impl<E> Inject for Address<E>where E: Environment,

§

type Primitive = Address<<E as Environment>::Network>

source§

impl<E> Inject for Boolean<E>where E: Environment,

source§

impl<E> Inject for Field<E>where E: Environment,

§

type Primitive = Field<<E as Environment>::Network>

source§

impl<E> Inject for Group<E>where E: Environment,

§

type Primitive = Group<<E as Environment>::Network>

source§

impl<E> Inject for Scalar<E>where E: Environment,

§

type Primitive = Scalar<<E as Environment>::Network>

source§

impl<E> Inject for StringType<E>where E: Environment,

§

type Primitive = StringType<<E as Environment>::Network>