#[repr(C)]pub struct ClosurePayload {
pub fn_ptr: *const u8,
pub env: Vec<GcRef>,
}Expand description
The runtime payload of a closure value: the function pointer plus the
captured environment values (one GcRef per captured variable, in capture
order established by the HIR capture analysis).
Fields§
§fn_ptr: *const u8The JIT’d entry-point function pointer, called as
fn(ctx: i64, closure_self: i64, params...) -> i64. The captures are not
trailing parameters; the prologue reads them out of this payload.
env: Vec<GcRef>The captured values, in the order the capture analysis recorded them.
Each is a GcRef into the GC heap.
Auto Trait Implementations§
impl !RefUnwindSafe for ClosurePayload
impl !Send for ClosurePayload
impl !Sync for ClosurePayload
impl !UnwindSafe for ClosurePayload
impl Freeze for ClosurePayload
impl Unpin for ClosurePayload
impl UnsafeUnpin for ClosurePayload
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