snarkvm_circuit_environment::traits

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

Source§

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)

Source§

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

Source§

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)

Source§

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

Source§

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

Source§

type Primitive = Vec<P>

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>