pub struct Store { /* private fields */ }Implementations§
Source§impl Store
impl Store
Sourcepub fn new(parent_store: Option<Rc<RefCell<Store>>>) -> Store
pub fn new(parent_store: Option<Rc<RefCell<Store>>>) -> Store
Creates a new Store.
§Arguments
parent_store - The parent of this store. This maintains all of the variables defined in a higher scope.
Sourcepub fn define(&mut self, name: &str, value: Rc<Value>)
pub fn define(&mut self, name: &str, value: Rc<Value>)
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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Store
impl !RefUnwindSafe for Store
impl !Send for Store
impl !Sync for Store
impl Unpin for Store
impl !UnwindSafe for Store
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