snarkvm_circuit_environment::traits

Trait Eject

Source
pub trait Eject {
    type Primitive;

    // Required methods
    fn eject_mode(&self) -> Mode;
    fn eject_value(&self) -> Self::Primitive;

    // Provided methods
    fn eject(&self) -> (Mode, Self::Primitive) { ... }
    fn is_constant(&self) -> bool { ... }
    fn is_public(&self) -> bool { ... }
    fn is_private(&self) -> bool { ... }
}
Expand description

Operations to eject from a circuit environment into primitive form.

Required Associated Types§

Required Methods§

Source

fn eject_mode(&self) -> Mode

Ejects the mode of the circuit type.

Source

fn eject_value(&self) -> Self::Primitive

Ejects the circuit type as a primitive value.

Provided Methods§

Source

fn eject(&self) -> (Mode, Self::Primitive)

Ejects the mode and primitive value of the circuit type.

Source

fn is_constant(&self) -> bool

Returns true if the circuit is a constant.

Source

fn is_public(&self) -> bool

Returns true if the circuit is a public.

Source

fn is_private(&self) -> bool

Returns true if the circuit is a private.

Implementations on Foreign Types§

Source§

impl Eject for Vec<Mode>

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a list of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

type Primitive = Vec<Mode>

Source§

impl<'a, C0: Eject> Eject for &'a (C0,)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

type Primitive = (<C0 as Eject>::Primitive,)

Source§

impl<'a, C0: Eject> Eject for (&'a C0,)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

type Primitive = (<C0 as Eject>::Primitive,)

Source§

impl<'a, C0: Eject, C1: Eject> Eject for &'a (C0, C1)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

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

Source§

impl<'a, C0: Eject, C1: Eject> Eject for (&'a C0, &'a C1)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

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

Source§

impl<'a, C0: Eject, C1: Eject, C2: Eject> Eject for &'a (C0, C1, C2)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

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

Source§

impl<'a, C0: Eject, C1: Eject, C2: Eject> Eject for (&'a C0, &'a C1, &'a C2)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

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

Source§

impl<'a, C0: Eject, C1: Eject, C2: Eject, C3: Eject> Eject for &'a (C0, C1, C2, C3)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

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

Source§

impl<'a, C0: Eject, C1: Eject, C2: Eject, C3: Eject> Eject for (&'a C0, &'a C1, &'a C2, &'a C3)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

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

Source§

impl<'a, C0: Eject, C1: Eject, C2: Eject, C3: Eject, C4: Eject> Eject for &'a (C0, C1, C2, C3, C4)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

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

Source§

impl<'a, C0: Eject, C1: Eject, C2: Eject, C3: Eject, C4: Eject> Eject for (&'a C0, &'a C1, &'a C2, &'a C3, &'a C4)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

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

Source§

impl<'a, C0: Eject, C1: Eject, C2: Eject, C3: Eject, C4: Eject, C5: Eject> Eject for &'a (C0, C1, C2, C3, C4, C5)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

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

Source§

impl<'a, C0: Eject, C1: Eject, C2: Eject, C3: Eject, C4: Eject, C5: Eject> Eject for (&'a C0, &'a C1, &'a C2, &'a C3, &'a C4, &'a C5)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

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

Source§

impl<'a, C0: Eject, C1: Eject, C2: Eject, C3: Eject, C4: Eject, C5: Eject, C6: Eject> Eject for &'a (C0, C1, C2, C3, C4, C5, C6)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

type Primitive = (<C0 as Eject>::Primitive, <C1 as Eject>::Primitive, <C2 as Eject>::Primitive, <C3 as Eject>::Primitive, <C4 as Eject>::Primitive, <C5 as Eject>::Primitive, <C6 as Eject>::Primitive)

Source§

impl<'a, C0: Eject, C1: Eject, C2: Eject, C3: Eject, C4: Eject, C5: Eject, C6: Eject> Eject for (&'a C0, &'a C1, &'a C2, &'a C3, &'a C4, &'a C5, &'a C6)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

type Primitive = (<C0 as Eject>::Primitive, <C1 as Eject>::Primitive, <C2 as Eject>::Primitive, <C3 as Eject>::Primitive, <C4 as Eject>::Primitive, <C5 as Eject>::Primitive, <C6 as Eject>::Primitive)

Source§

impl<'a, C0: Eject, C1: Eject, C2: Eject, C3: Eject, C4: Eject, C5: Eject, C6: Eject, C7: Eject> Eject for &'a (C0, C1, C2, C3, C4, C5, C6, C7)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

type Primitive = (<C0 as Eject>::Primitive, <C1 as Eject>::Primitive, <C2 as Eject>::Primitive, <C3 as Eject>::Primitive, <C4 as Eject>::Primitive, <C5 as Eject>::Primitive, <C6 as Eject>::Primitive, <C7 as Eject>::Primitive)

Source§

impl<'a, C0: Eject, C1: Eject, C2: Eject, C3: Eject, C4: Eject, C5: Eject, C6: Eject, C7: Eject> Eject for (&'a C0, &'a C1, &'a C2, &'a C3, &'a C4, &'a C5, &'a C6, &'a C7)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

type Primitive = (<C0 as Eject>::Primitive, <C1 as Eject>::Primitive, <C2 as Eject>::Primitive, <C3 as Eject>::Primitive, <C4 as Eject>::Primitive, <C5 as Eject>::Primitive, <C6 as Eject>::Primitive, <C7 as Eject>::Primitive)

Source§

impl<'a, C0: Eject, C1: Eject, C2: Eject, C3: Eject, C4: Eject, C5: Eject, C6: Eject, C7: Eject, C8: Eject> Eject for &'a (C0, C1, C2, C3, C4, C5, C6, C7, C8)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

type Primitive = (<C0 as Eject>::Primitive, <C1 as Eject>::Primitive, <C2 as Eject>::Primitive, <C3 as Eject>::Primitive, <C4 as Eject>::Primitive, <C5 as Eject>::Primitive, <C6 as Eject>::Primitive, <C7 as Eject>::Primitive, <C8 as Eject>::Primitive)

Source§

impl<'a, C0: Eject, C1: Eject, C2: Eject, C3: Eject, C4: Eject, C5: Eject, C6: Eject, C7: Eject, C8: Eject> Eject for (&'a C0, &'a C1, &'a C2, &'a C3, &'a C4, &'a C5, &'a C6, &'a C7, &'a C8)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

type Primitive = (<C0 as Eject>::Primitive, <C1 as Eject>::Primitive, <C2 as Eject>::Primitive, <C3 as Eject>::Primitive, <C4 as Eject>::Primitive, <C5 as Eject>::Primitive, <C6 as Eject>::Primitive, <C7 as Eject>::Primitive, <C8 as Eject>::Primitive)

Source§

impl<'a, C0: Eject, C1: Eject, C2: Eject, C3: Eject, C4: Eject, C5: Eject, C6: Eject, C7: Eject, C8: Eject, C9: Eject> Eject for &'a (C0, C1, C2, C3, C4, C5, C6, C7, C8, C9)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

type Primitive = (<C0 as Eject>::Primitive, <C1 as Eject>::Primitive, <C2 as Eject>::Primitive, <C3 as Eject>::Primitive, <C4 as Eject>::Primitive, <C5 as Eject>::Primitive, <C6 as Eject>::Primitive, <C7 as Eject>::Primitive, <C8 as Eject>::Primitive, <C9 as Eject>::Primitive)

Source§

impl<'a, C0: Eject, C1: Eject, C2: Eject, C3: Eject, C4: Eject, C5: Eject, C6: Eject, C7: Eject, C8: Eject, C9: Eject> Eject for (&'a C0, &'a C1, &'a C2, &'a C3, &'a C4, &'a C5, &'a C6, &'a C7, &'a C8, &'a C9)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

type Primitive = (<C0 as Eject>::Primitive, <C1 as Eject>::Primitive, <C2 as Eject>::Primitive, <C3 as Eject>::Primitive, <C4 as Eject>::Primitive, <C5 as Eject>::Primitive, <C6 as Eject>::Primitive, <C7 as Eject>::Primitive, <C8 as Eject>::Primitive, <C9 as Eject>::Primitive)

Source§

impl<'a, C0: Eject, C1: Eject, C2: Eject, C3: Eject, C4: Eject, C5: Eject, C6: Eject, C7: Eject, C8: Eject, C9: Eject, C10: Eject> Eject for &'a (C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

type Primitive = (<C0 as Eject>::Primitive, <C1 as Eject>::Primitive, <C2 as Eject>::Primitive, <C3 as Eject>::Primitive, <C4 as Eject>::Primitive, <C5 as Eject>::Primitive, <C6 as Eject>::Primitive, <C7 as Eject>::Primitive, <C8 as Eject>::Primitive, <C9 as Eject>::Primitive, <C10 as Eject>::Primitive)

Source§

impl<'a, C0: Eject, C1: Eject, C2: Eject, C3: Eject, C4: Eject, C5: Eject, C6: Eject, C7: Eject, C8: Eject, C9: Eject, C10: Eject> Eject for (&'a C0, &'a C1, &'a C2, &'a C3, &'a C4, &'a C5, &'a C6, &'a C7, &'a C8, &'a C9, &'a C10)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

type Primitive = (<C0 as Eject>::Primitive, <C1 as Eject>::Primitive, <C2 as Eject>::Primitive, <C3 as Eject>::Primitive, <C4 as Eject>::Primitive, <C5 as Eject>::Primitive, <C6 as Eject>::Primitive, <C7 as Eject>::Primitive, <C8 as Eject>::Primitive, <C9 as Eject>::Primitive, <C10 as Eject>::Primitive)

Source§

impl<'a, C0: Eject, C1: Eject, C2: Eject, C3: Eject, C4: Eject, C5: Eject, C6: Eject, C7: Eject, C8: Eject, C9: Eject, C10: Eject, C11: Eject> Eject for &'a (C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

type Primitive = (<C0 as Eject>::Primitive, <C1 as Eject>::Primitive, <C2 as Eject>::Primitive, <C3 as Eject>::Primitive, <C4 as Eject>::Primitive, <C5 as Eject>::Primitive, <C6 as Eject>::Primitive, <C7 as Eject>::Primitive, <C8 as Eject>::Primitive, <C9 as Eject>::Primitive, <C10 as Eject>::Primitive, <C11 as Eject>::Primitive)

Source§

impl<'a, C0: Eject, C1: Eject, C2: Eject, C3: Eject, C4: Eject, C5: Eject, C6: Eject, C7: Eject, C8: Eject, C9: Eject, C10: Eject, C11: Eject> Eject for (&'a C0, &'a C1, &'a C2, &'a C3, &'a C4, &'a C5, &'a C6, &'a C7, &'a C8, &'a C9, &'a C10, &'a C11)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

type Primitive = (<C0 as Eject>::Primitive, <C1 as Eject>::Primitive, <C2 as Eject>::Primitive, <C3 as Eject>::Primitive, <C4 as Eject>::Primitive, <C5 as Eject>::Primitive, <C6 as Eject>::Primitive, <C7 as Eject>::Primitive, <C8 as Eject>::Primitive, <C9 as Eject>::Primitive, <C10 as Eject>::Primitive, <C11 as Eject>::Primitive)

Source§

impl<'a, C0: Eject, C1: Eject, C2: Eject, C3: Eject, C4: Eject, C5: Eject, C6: Eject, C7: Eject, C8: Eject, C9: Eject, C10: Eject, C11: Eject, C12: Eject> Eject for &'a (C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

type Primitive = (<C0 as Eject>::Primitive, <C1 as Eject>::Primitive, <C2 as Eject>::Primitive, <C3 as Eject>::Primitive, <C4 as Eject>::Primitive, <C5 as Eject>::Primitive, <C6 as Eject>::Primitive, <C7 as Eject>::Primitive, <C8 as Eject>::Primitive, <C9 as Eject>::Primitive, <C10 as Eject>::Primitive, <C11 as Eject>::Primitive, <C12 as Eject>::Primitive)

Source§

impl<'a, C0: Eject, C1: Eject, C2: Eject, C3: Eject, C4: Eject, C5: Eject, C6: Eject, C7: Eject, C8: Eject, C9: Eject, C10: Eject, C11: Eject, C12: Eject> Eject for (&'a C0, &'a C1, &'a C2, &'a C3, &'a C4, &'a C5, &'a C6, &'a C7, &'a C8, &'a C9, &'a C10, &'a C11, &'a C12)

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a tuple of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

type Primitive = (<C0 as Eject>::Primitive, <C1 as Eject>::Primitive, <C2 as Eject>::Primitive, <C3 as Eject>::Primitive, <C4 as Eject>::Primitive, <C5 as Eject>::Primitive, <C6 as Eject>::Primitive, <C7 as Eject>::Primitive, <C8 as Eject>::Primitive, <C9 as Eject>::Primitive, <C10 as Eject>::Primitive, <C11 as Eject>::Primitive, <C12 as Eject>::Primitive)

Source§

impl<C: Eject<Primitive = P>, P> Eject for &[C]

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a list of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

type Primitive = Vec<P>

Source§

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

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a list of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

type Primitive = Vec<P>

Source§

impl<C: Eject<Primitive = P>, P, const N: usize> Eject for [C; N]

Source§

fn eject_mode(&self) -> Mode

A helper method to deduce the mode from a list of Eject circuits.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the value from each circuit.

Source§

type Primitive = Vec<P>

Implementors§