pub struct LinearClosure { /* private fields */ }Expand description
A closure the linear-memory backend made: which function runs, and the environment object it reads its captures out of.
It roots the object it names. A frame is a root because a static map
says which of its slots are references, and the lowering clears a
temporary’s slot at its last use — which for a closure handed to a host is
the instruction after the call. The crate::host::Reentry contract says
a host may keep a callback for later, so the value has to keep the object
alive by itself, and the handle inside this is what does it. Nothing in a
frame need name the object while a host holds one, and after the call
nothing does.
Trait Implementations§
Source§impl Clone for LinearClosure
impl Clone for LinearClosure
Source§fn clone(&self) -> LinearClosure
fn clone(&self) -> LinearClosure
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LinearClosure
impl RefUnwindSafe for LinearClosure
impl Send for LinearClosure
impl Sync for LinearClosure
impl Unpin for LinearClosure
impl UnsafeUnpin for LinearClosure
impl UnwindSafe for LinearClosure
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