pub struct Scope {
pub vars: BTreeMap<String, Value>,
pub parent: Option<Rc<RefCell<Scope>>>,
pub is_block: bool,
pub gc_slot: u32,
}Expand description
変数スコープ。
Fields§
§vars: BTreeMap<String, Value>§parent: Option<Rc<RefCell<Scope>>>§is_block: boolブロック({ let/const ... }・catch)のスコープか。var はここを素通りして
最も近い関数(またはプログラム)のスコープへ宣言する。
gc_slot: u32循環ゴミ回収(cycle_gc)の台帳の番号。
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Scope
impl !Send for Scope
impl !Sync for Scope
impl !UnwindSafe for Scope
impl Freeze for Scope
impl Unpin for Scope
impl UnsafeUnpin for Scope
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