pub struct Locals(/* private fields */);Expand description
the local variables of a scope: a persistent chain of (name, value) frames (F21 perf: extending a scope with one binding — the hot path in a comprehension iterated over thousands of items — allocates one small frame instead of cloning a whole map; the depth is a handful of loop/parameter names, so a linear lookup is cheap). This is a Rust-only representation; the reference keeps a map (see AGENTS.md, the performance layer).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Locals
impl !Send for Locals
impl !Sync for Locals
impl !UnwindSafe for Locals
impl Freeze for Locals
impl Unpin for Locals
impl UnsafeUnpin for Locals
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