Trait Inject

Source
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) -> Self
where Self: Sized,

Initializes a constant of the given primitive value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

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

Source§

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

Source§

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

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<C, P> Inject for Vec<C>
where C: Inject<Primitive = P>,

Source§

type Primitive = Vec<P>

Source§

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

Implementors§

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<E, PH, const DEPTH: u8, const ARITY: u8> Inject for KaryMerklePath<E, PH, DEPTH, ARITY>
where E: Environment, PH: PathHash<E>,

Source§

type Primitive = KaryMerklePath<<PH as PathHash<E>>::Primitive, DEPTH, ARITY>

Source§

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

Source§

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

Source§

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,

Source§

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,

Source§

impl<E, const VARIANT: usize> Inject for BooleanHash<E, VARIANT>
where E: Environment,