pub struct Environment { /* private fields */ }
Implementations§
Source§impl Environment
impl Environment
pub fn new(parent: Environment) -> Self
pub fn base() -> Self
pub fn exit(self) -> Result<Environment, EnvError>
pub fn add_var( &mut self, name: String, typ: CortexType, value: CortexValue, ) -> Result<(), EnvError>
pub fn add_const( &mut self, name: String, typ: CortexType, value: CortexValue, ) -> Result<(), EnvError>
pub fn get_type_of(&self, name: &String) -> Result<&CortexType, EnvError>
pub fn get_value(&self, name: &str) -> Result<&CortexValue, EnvError>
pub fn get_value_mut( &mut self, name: &str, ) -> Result<&mut CortexValue, EnvError>
pub fn set_value( &mut self, name: &str, value: CortexValue, ) -> Result<(), EnvError>
pub fn get_function(&self, name: &String) -> Result<Rc<Function>, EnvError>
pub fn add_function(&mut self, func: Function) -> Result<(), EnvError>
pub fn get_struct(&self, name: &String) -> Result<Rc<Struct>, EnvError>
pub fn add_struct(&mut self, item: Struct) -> Result<(), EnvError>
Auto Trait Implementations§
impl Freeze for Environment
impl !RefUnwindSafe for Environment
impl !Send for Environment
impl !Sync for Environment
impl Unpin for Environment
impl !UnwindSafe for Environment
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