Struct circomspect_program_structure::intermediate_representation::value_meta::ValueEnvironment
source · [−]pub struct ValueEnvironment { /* private fields */ }Implementations
sourceimpl ValueEnvironment
impl ValueEnvironment
pub fn new(constants: &UsefulConstants) -> ValueEnvironment
sourcepub fn add_variable(
&mut self,
name: &VariableName,
value: &ValueReduction
) -> bool
pub fn add_variable(
&mut self,
name: &VariableName,
value: &ValueReduction
) -> bool
Set the value of the given variable. Returns true on first update.
Panics
This function panics if the caller attempts to set two different values for the same variable.
pub fn get_variable(&self, name: &VariableName) -> Option<&ValueReduction>
Trait Implementations
sourceimpl Clone for ValueEnvironment
impl Clone for ValueEnvironment
sourcefn clone(&self) -> ValueEnvironment
fn clone(&self) -> ValueEnvironment
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl RefUnwindSafe for ValueEnvironment
impl Send for ValueEnvironment
impl Sync for ValueEnvironment
impl Unpin for ValueEnvironment
impl UnwindSafe for ValueEnvironment
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more