Struct rayon_core::job::HeapJob
source · pub(crate) struct HeapJob<BODY>{
job: BODY,
}
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
Implementations§
source§impl<BODY> HeapJob<BODY>
impl<BODY> HeapJob<BODY>
pub(crate) fn new(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