#[repr(C)]pub struct ClosureData {
pub fn_ptr: usize,
pub env: Arc<[Value]>,
}Expand description
Closure data stored on the heap for NaN-boxing
In the 40-byte Value, Closure stored fn_ptr and env pointer inline. With NaN-boxing, we heap-allocate this struct.
Fields§
§fn_ptr: usizeFunction pointer
env: Arc<[Value]>Captured environment (Arc for shared ownership)
Trait Implementations§
Source§impl Clone for ClosureData
impl Clone for ClosureData
Source§fn clone(&self) -> ClosureData
fn clone(&self) -> ClosureData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ClosureData
impl RefUnwindSafe for ClosureData
impl Send for ClosureData
impl Sync for ClosureData
impl Unpin for ClosureData
impl UnwindSafe for ClosureData
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