[−][src]Struct dark_vm::utils::store::Store
Implementations
impl Store[src]
pub fn new(parent_store: Option<Rc<RefCell<Store>>>) -> Store[src]
Creates a new Store.
Arguments
parent_store - The parent of this store. This maintains all of the variables defined in a higher scope.
pub fn define(&mut self, name: &str, value: Rc<Value>)[src]
This function defines a new variable. The variable will be bound to the scope containing this store. This function will override any existing value of a previously defined value.
Arguments
name - The name of the variable.
value - The value of the variable.
pub fn get(&self, name: &str, pos: usize) -> Result<Rc<Value>, Error>[src]
This function gets the value of a variable. If the variable does not exist, then an error is reported.
Arguments
name - The name of the variable.
pos - The position where this operation was called.
Trait Implementations
impl Debug for Store[src]
impl PartialEq<Store> for Store[src]
impl StructuralPartialEq for Store[src]
Auto Trait Implementations
impl !RefUnwindSafe for Store
impl !Send for Store
impl !Sync for Store
impl Unpin for Store
impl !UnwindSafe for Store
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,