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<C0: Inject, C1: Inject> Inject for (C0, C1)

§

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

source§

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

source§

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

§

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

source§

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

source§

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

§

type Primitive = Vec<P, Global>

source§

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

source§

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

§

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

source§

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

source§

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

§

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

source§

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

Implementors§

source§

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