pub struct Parameterized<F, P> { /* private fields */ }Expand description
A task that accepts parameters for customized execution.
This provides a way to create reusable task templates that can be parameterized at execution time.
Implementations§
Source§impl<F, P> Parameterized<F, P>
impl<F, P> Parameterized<F, P>
Sourcepub fn new(func: F, params: P, context: TaskContext) -> Parameterized<F, P>
pub fn new(func: F, params: P, context: TaskContext) -> Parameterized<F, P>
Create a new parameterized task.
Trait Implementations§
Source§impl<F, P, R> Task for Parameterized<F, P>
impl<F, P, R> Task for Parameterized<F, P>
Source§fn context(&self) -> &TaskContext
fn context(&self) -> &TaskContext
Get the task context for scheduling and debugging.
Source§fn is_stealable(&self) -> bool
fn is_stealable(&self) -> bool
Check if this task can be stolen by another thread.
Source§fn estimated_cost(&self) -> u32
fn estimated_cost(&self) -> u32
Estimate the computational cost of this task (for load balancing).
Auto Trait Implementations§
impl<F, P> Freeze for Parameterized<F, P>
impl<F, P> RefUnwindSafe for Parameterized<F, P>
impl<F, P> Send for Parameterized<F, P>
impl<F, P> Sync for Parameterized<F, P>
impl<F, P> Unpin for Parameterized<F, P>
impl<F, P> UnsafeUnpin for Parameterized<F, P>
impl<F, P> UnwindSafe for Parameterized<F, P>
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> TaskExt for Twhere
T: Task,
impl<T> TaskExt for Twhere
T: Task,
Source§fn with_context(self, context: TaskContext) -> ContextualTask<Self>
fn with_context(self, context: TaskContext) -> ContextualTask<Self>
Convert this task into a task with the given context.