Struct circomspect_program_structure::intermediate_representation::value_meta::ValueKnowledge
source · pub struct ValueKnowledge { /* private fields */ }Implementations§
source§impl ValueKnowledge
impl ValueKnowledge
pub fn new() -> ValueKnowledge
sourcepub fn set_reduces_to(&mut self, reduces_to: ValueReduction) -> bool
pub fn set_reduces_to(&mut self, reduces_to: ValueReduction) -> bool
Sets the value of the node. Returns true on the first update.
sourcepub fn get_reduces_to(&self) -> Option<&ValueReduction>
pub fn get_reduces_to(&self) -> Option<&ValueReduction>
Gets the value of the node. Returns None if the value is unknown.
sourcepub fn is_constant(&self) -> bool
pub fn is_constant(&self) -> bool
Returns true if the value of the node is known.
sourcepub fn is_boolean(&self) -> bool
pub fn is_boolean(&self) -> bool
Returns true if the value of the node is a boolean.
sourcepub fn is_field_element(&self) -> bool
pub fn is_field_element(&self) -> bool
Returns true if the value of the node is a field element.
Trait Implementations§
source§impl Clone for ValueKnowledge
impl Clone for ValueKnowledge
source§fn clone(&self) -> ValueKnowledge
fn clone(&self) -> ValueKnowledge
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 Default for ValueKnowledge
impl Default for ValueKnowledge
source§fn default() -> ValueKnowledge
fn default() -> ValueKnowledge
Returns the “default value” for a type. Read more