[][src]Struct dark_vm::utils::store::Store

pub struct Store { /* fields omitted */ }

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.