pub struct SessionScope {
pub globals: Vec<String>,
pub consts: Vec<String>,
pub classes: Vec<ClassInfo>,
}Expand description
The accumulated top-level scope of a REPL session: every name in scope, the
subset that are constants, and the object definitions (for inheritance and
super checks). A snippet is checked as if these were already declared, so it
can reference — and redefine — anything earlier snippets introduced. Built by
the interpreter from its live session state, so the checker and the runtime
always agree on what exists.
Fields§
§globals: Vec<String>§consts: Vec<String>§classes: Vec<ClassInfo>Implementations§
Source§impl SessionScope
impl SessionScope
Sourcepub fn empty() -> SessionScope
pub fn empty() -> SessionScope
An empty session — no prior declarations. Used by the batch [check].
Trait Implementations§
Source§impl Default for SessionScope
impl Default for SessionScope
Source§fn default() -> SessionScope
fn default() -> SessionScope
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SessionScope
impl RefUnwindSafe for SessionScope
impl Send for SessionScope
impl Sync for SessionScope
impl Unpin for SessionScope
impl UnsafeUnpin for SessionScope
impl UnwindSafe for SessionScope
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