pub struct Frame {
pub name: String,
pub current_store: Rc<RefCell<Store>>,
/* private fields */
}Fields§
§name: String§current_store: Rc<RefCell<Store>>Implementations§
Source§impl Frame
impl Frame
Sourcepub fn new(
caller_position: usize,
name: &str,
parent_store: Option<&Rc<RefCell<Store>>>,
) -> Frame
pub fn new( caller_position: usize, name: &str, parent_store: Option<&Rc<RefCell<Store>>>, ) -> Frame
Constructs a new frame. A Frame maintains the caller’s position, along with its name. In the future, it will maintain local variables and any parameters passed in.
§Arguments
caller_position - The position where this frame was called or entered.
name - The name of this frame.
pub fn find(&self, name: &str, pos: usize) -> Result<Rc<Value>, Error>
pub fn define(&mut self, name: &str, value: Rc<Value>)
Sourcepub fn get_caller_position(&self) -> usize
pub fn get_caller_position(&self) -> usize
This function gets the position of the caller of this frame.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Frame
impl !RefUnwindSafe for Frame
impl !Send for Frame
impl !Sync for Frame
impl Unpin for Frame
impl !UnwindSafe for Frame
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