pub struct Closure {
pub params: Arc<[VarId]>,
pub body: Arc<Core>,
pub env: Arc<Env>,
pub locals: u32,
}Fields§
§params: Arc<[VarId]>§body: Arc<Core>The same Arc the CoreKind::Lam node holds, so building a closure is a refcount bump
rather than a copy of the code.
env: Arc<Env>Behind an Arc so that calling the closure clones a pointer rather than the environment.
locals: u32How many bindings the body makes, copied off the CoreKind::Lam node so that a call can
size one frame for the parameters and all of them. crate::frames is what counts it.
Trait Implementations§
Source§impl Ord for Closure
impl Ord for Closure
Source§impl PartialEq for Closure
impl PartialEq for Closure
Source§impl PartialOrd for Closure
impl PartialOrd for Closure
impl Eq for Closure
Auto Trait Implementations§
impl Freeze for Closure
impl RefUnwindSafe for Closure
impl Send for Closure
impl Sync for Closure
impl Unpin for Closure
impl UnwindSafe for Closure
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