Struct stack_queue::assignment::TaskAssignment
source · Expand description
An assignment of a task range to be processed
Implementations§
source§impl<'a, T, const N: usize> TaskAssignment<'a, T, N>where
T: TaskQueue,
impl<'a, T, const N: usize> TaskAssignment<'a, T, N>where
T: TaskQueue,
sourcepub fn resolve_with_iter<I>(self, iter: I) -> CompletionReceipt<T>where
I: IntoIterator<Item = T::Value>,
pub fn resolve_with_iter<I>(self, iter: I) -> CompletionReceipt<T>where
I: IntoIterator<Item = T::Value>,
Resolve task assignment with an iterator where indexes align with tasks
sourcepub fn map<F>(self, op: F) -> CompletionReceipt<T>where
F: Fn(T::Task) -> T::Value + Sync,
pub fn map<F>(self, op: F) -> CompletionReceipt<T>where
F: Fn(T::Task) -> T::Value + Sync,
Resolve task assignment by mapping each task into it’s respective value
sourcepub async fn with_blocking<F>(self, f: F) -> CompletionReceipt<T>where
F: for<'b> FnOnce(TaskAssignment<'b, T, N>) -> CompletionReceipt<T> + Send + 'static,
pub async fn with_blocking<F>(self, f: F) -> CompletionReceipt<T>where
F: for<'b> FnOnce(TaskAssignment<'b, T, N>) -> CompletionReceipt<T> + Send + 'static,
Resolve task assignment within a thread where blocking is acceptable. If the runtime would otherwise shutdown, instead it will suspend for the lifetime of this thread as to protect the underlying thread local data from being destroyed
Trait Implementations§
impl<'a, T, const N: usize> Send for TaskAssignment<'a, T, N>where
T: TaskQueue,
impl<'a, T, const N: usize> Sync for TaskAssignment<'a, T, N>where
T: TaskQueue,
<T as TaskQueue>::Task: Sync,
Auto Trait Implementations§
impl<'a, T, const N: usize> !RefUnwindSafe for TaskAssignment<'a, T, N>
impl<'a, T, const N: usize> Unpin for TaskAssignment<'a, T, N>
impl<'a, T, const N: usize> !UnwindSafe for TaskAssignment<'a, T, N>
Blanket Implementations§
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
T: SqlType + TypedExpressionType,
fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
T: SqlType + TypedExpressionType,
Convert
self to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
T: SqlType + TypedExpressionType,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
T: SqlType + TypedExpressionType,
Convert
&self to an expression for Diesel’s query builder. Read more