pub struct CircuitVariable { /* private fields */ }Expand description
Represents a variable within a circuit during construction.
A CircuitVariable is created during circuit building and encapsulates a specific
variable type (public, private, local, or constant). It serves as a handle to reference
variables in circuit operations and maintains the variable’s type information internally.
§Usage
Circuit variables are typically created through:
VariableInitermethods for creating new variables- API operations that return intermediate results
- Circuit builder operations that allocate local variables
§Implementation Details
The struct contains a VariableType that specifies whether
the variable is public input, private witness, local intermediate value, or a constant.
This type information is used by the circuit builder to generate proper constraints.
Trait Implementations§
Source§impl Clone for CircuitVariable
impl Clone for CircuitVariable
Source§fn clone(&self) -> CircuitVariable
fn clone(&self) -> CircuitVariable
Returns a duplicate 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 Debug for CircuitVariable
impl Debug for CircuitVariable
Source§impl Variable for CircuitVariable
impl Variable for CircuitVariable
Source§fn ty(&self) -> VariableType
fn ty(&self) -> VariableType
Returns the variable type representation for this variable.
This is used internally by the circuit builder to track variable usage.
Auto Trait Implementations§
impl Freeze for CircuitVariable
impl RefUnwindSafe for CircuitVariable
impl Send for CircuitVariable
impl Sync for CircuitVariable
impl Unpin for CircuitVariable
impl UnwindSafe for CircuitVariable
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