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, 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<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<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)

§

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

§

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<A> Inject for Entry<A, Plaintext<A>>where A: Aleo,

§

type Primitive = Entry<<A as Environment>::Network, Plaintext<<A as Environment>::Network>>

source§

impl<A> Inject for Entry<A, Ciphertext<A>>where A: Aleo,

§

type Primitive = Entry<<A as Environment>::Network, Ciphertext<<A as Environment>::Network>>

source§

impl<A> Inject for InputID<A>where A: Aleo,

§

type Primitive = InputID<<A as Environment>::Network>

source§

impl<A> Inject for Literal<A>where A: Aleo,

§

type Primitive = Literal<<A as Environment>::Network>

source§

impl<A> Inject for OutputID<A>where A: Aleo,

§

type Primitive = OutputID<<A as Environment>::Network>

source§

impl<A> Inject for Owner<A, Plaintext<A>>where A: Aleo,

§

type Primitive = Owner<<A as Environment>::Network, Plaintext<<A as Environment>::Network>>

source§

impl<A> Inject for Owner<A, Ciphertext<A>>where A: Aleo,

§

type Primitive = Owner<<A as Environment>::Network, Ciphertext<<A as Environment>::Network>>

source§

impl<A> Inject for Plaintext<A>where A: Aleo,

§

type Primitive = Plaintext<<A as Environment>::Network>

source§

impl<A> Inject for Value<A>where A: Aleo,

§

type Primitive = Value<<A as Environment>::Network>

source§

impl<A> Inject for Ciphertext<A>where A: Aleo,

§

type Primitive = Ciphertext<<A as Environment>::Network>

source§

impl<A> Inject for ComputeKey<A>where A: Aleo,

§

type Primitive = ComputeKey<<A as Environment>::Network>

source§

impl<A> Inject for GraphKey<A>where A: Aleo,

§

type Primitive = GraphKey<<A as Environment>::Network>

source§

impl<A> Inject for HeaderLeaf<A>where A: Aleo,

§

type Primitive = HeaderLeaf<<A as Environment>::Network>

source§

impl<A> Inject for Identifier<A>where A: Aleo,

§

type Primitive = Identifier<<A as Environment>::Network>

source§

impl<A> Inject for PrivateKey<A>where A: Aleo,

§

type Primitive = PrivateKey<<A as Environment>::Network>

source§

impl<A> Inject for ProgramID<A>where A: Aleo,

§

type Primitive = ProgramID<<A as Environment>::Network>

source§

impl<A> Inject for Record<A, Plaintext<A>>where A: Aleo,

§

type Primitive = Record<<A as Environment>::Network, Plaintext<<A as Environment>::Network>>

source§

impl<A> Inject for Record<A, Ciphertext<A>>where A: Aleo,

§

type Primitive = Record<<A as Environment>::Network, Ciphertext<<A as Environment>::Network>>

source§

impl<A> Inject for Request<A>where A: Aleo,

§

type Primitive = Request<<A as Environment>::Network>

source§

impl<A> Inject for Signature<A>where A: Aleo,

§

type Primitive = Signature<<A as Environment>::Network>

source§

impl<A> Inject for StatePath<A>where A: Aleo,

§

type Primitive = StatePath<<A as Environment>::Network>

source§

impl<A> Inject for TransactionLeaf<A>where A: Aleo,

§

type Primitive = TransactionLeaf<<A as Environment>::Network>

source§

impl<A> Inject for TransitionLeaf<A>where A: Aleo,

§

type Primitive = TransitionLeaf<<A as Environment>::Network>

source§

impl<A> Inject for ViewKey<A>where A: Aleo,

§

type Primitive = ViewKey<<A as Environment>::Network>

source§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

source§

impl<E, const DEPTH: u8> Inject for MerklePath<E, DEPTH>where E: Environment,

§

type Primitive = MerklePath<<E as Environment>::Network, DEPTH>

source§

impl<E, const NUM_BITS: u8> Inject for Pedersen<E, NUM_BITS>where E: Environment,

§

type Primitive = Pedersen<<E as Environment>::Network, NUM_BITS>

source§

impl<E, const NUM_WINDOWS: u8, const WINDOW_SIZE: u8> Inject for BHP<E, NUM_WINDOWS, WINDOW_SIZE>where E: Environment,

§

type Primitive = BHP<<E as Environment>::Network, NUM_WINDOWS, WINDOW_SIZE>

source§

impl<E, const RATE: usize> Inject for Poseidon<E, RATE>where E: Environment,

§

type Primitive = Poseidon<<E as Environment>::Network, RATE>