pub(crate) struct HeapJob<BODY>{
    job: BODY,
    tlv: Tlv,
}Expand description
Represents a job stored in the heap. Used to implement
scope. Unlike StackJob, when executed, HeapJob simply
invokes a closure, which then triggers the appropriate logic to
signal that the job executed.
(Probably StackJob should be refactored in a similar fashion.)
Fields§
§job: BODY§tlv: TlvImplementations§
Source§impl<BODY> HeapJob<BODY>
 
impl<BODY> HeapJob<BODY>
pub(crate) fn new(tlv: Tlv, job: BODY) -> Box<Self>
Sourcepub(crate) unsafe fn into_job_ref(self: Box<Self>) -> JobRef
 
pub(crate) unsafe fn into_job_ref(self: Box<Self>) -> JobRef
Creates a JobRef from this job – note that this hides all
lifetimes, so it is up to you to ensure that this JobRef
doesn’t outlive any data that it closes over.
Sourcepub(crate) fn into_static_job_ref(self: Box<Self>) -> JobRefwhere
    BODY: 'static,
 
pub(crate) fn into_static_job_ref(self: Box<Self>) -> JobRefwhere
    BODY: 'static,
Creates a static JobRef from this job.
Trait Implementations§
Auto Trait Implementations§
impl<BODY> Freeze for HeapJob<BODY>where
    BODY: Freeze,
impl<BODY> RefUnwindSafe for HeapJob<BODY>where
    BODY: RefUnwindSafe,
impl<BODY> Send for HeapJob<BODY>
impl<BODY> Sync for HeapJob<BODY>where
    BODY: Sync,
impl<BODY> Unpin for HeapJob<BODY>where
    BODY: Unpin,
impl<BODY> UnwindSafe for HeapJob<BODY>where
    BODY: UnwindSafe,
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
Source§impl<T> Pointable for T
 
impl<T> Pointable for T
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.