pub struct Evaluator { /* private fields */ }
Implementations§
source§impl Evaluator
impl Evaluator
pub fn new() -> Evaluator
pub fn import_ext_instr_set( &mut self, id: u32, name: String ) -> Result<(), Error>
pub fn get_ext_instr_set_name(&mut self, id: u32) -> Result<&str, Error>
pub fn set(&mut self, id: u32, constant: Constant) -> Result<&Constant, Error>
pub fn get(&self, id: u32) -> Result<&Constant, Error>
pub fn get_value(&self, id: u32) -> Result<&ConstantValue, Error>
pub fn iter(&self) -> impl Iterator<Item = (&u32, &Constant)>
pub fn evaluate( op: Op, result_ty: &Type, operands: &[ConstantValue] ) -> Result<ConstantValue, Error>
pub fn interpret( &mut self, op: Op, result_id: u32, result_ty: &Type, operand_ids: &[u32] ) -> Result<&Constant, Error>
pub fn constants(&self) -> Vec<Constant>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Evaluator
impl RefUnwindSafe for Evaluator
impl Send for Evaluator
impl Sync for Evaluator
impl Unpin for Evaluator
impl UnwindSafe for Evaluator
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