Enum snarkvm_circuit::helpers::CircuitType
source · pub enum CircuitType<T>where
T: Eject,{
Constant(Constant<T>),
Public,
Private,
}
Expand description
Helper enum used in the case where a circuit’s output mode or counts are determined by its mode and the actual value of the circuit.
Variants§
Implementations§
Trait Implementations§
source§impl<T> Clone for CircuitType<T>where
T: Clone + Eject,
impl<T> Clone for CircuitType<T>where T: Clone + Eject,
source§fn clone(&self) -> CircuitType<T>
fn clone(&self) -> CircuitType<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T> From<&T> for CircuitType<T>where
T: Eject + Clone,
impl<T> From<&T> for CircuitType<T>where T: Eject + Clone,
Initializes a new CircuitType
from a circuit.
If the circuit is constant, the CircuitType
will be Constant(circuit)
.
Otherwise, the CircuitType
will be Public
or Private
.
source§fn from(circuit: &T) -> CircuitType<T>
fn from(circuit: &T) -> CircuitType<T>
Converts to this type from the input type.
source§impl<T> From<T> for CircuitType<T>where
T: Eject + Clone,
impl<T> From<T> for CircuitType<T>where T: Eject + Clone,
Initializes a new CircuitType
from a circuit.
If the circuit is constant, the CircuitType
will be Constant(circuit)
.
Otherwise, the CircuitType
will be Public
or Private
.
source§fn from(circuit: T) -> CircuitType<T>
fn from(circuit: T) -> CircuitType<T>
Converts to this type from the input type.
Auto Trait Implementations§
impl<T> RefUnwindSafe for CircuitType<T>where T: RefUnwindSafe,
impl<T> Send for CircuitType<T>where T: Send,
impl<T> Sync for CircuitType<T>where T: Sync,
impl<T> Unpin for CircuitType<T>where T: Unpin,
impl<T> UnwindSafe for CircuitType<T>where T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more