pub struct PendingAssignment<'a, T: TaskQueue, const N: usize> { /* private fields */ }
Expand description
The responsibilty to process a yet to be assigned set of tasks.
Implementations§
Source§impl<'a, T, const N: usize> PendingAssignment<'a, T, N>where
T: TaskQueue,
impl<'a, T, const N: usize> PendingAssignment<'a, T, N>where
T: TaskQueue,
Sourcepub fn into_assignment(self) -> TaskAssignment<'a, T, N>
pub fn into_assignment(self) -> TaskAssignment<'a, T, N>
By converting into a TaskAssignment
the task range responsible for processing will be
bounded and further tasks enqueued will be of a new batch. Assignment of a task range can be
deferred until resources such as database connections are ready as a way to process tasks in
larger batches. This operation is constant time and wait-free
Sourcepub async fn with_blocking<F>(self, f: F) -> CompletionReceipt<T>
pub async fn with_blocking<F>(self, f: F) -> CompletionReceipt<T>
Move PendingAssignment
into a thread where blocking is acceptable.
Trait Implementations§
impl<T, const N: usize> Send for PendingAssignment<'_, T, N>where
T: TaskQueue,
impl<T, const N: usize> Sync for PendingAssignment<'_, T, N>where
T: TaskQueue,
Auto Trait Implementations§
impl<'a, T, const N: usize> Freeze for PendingAssignment<'a, T, N>
impl<'a, T, const N: usize> !RefUnwindSafe for PendingAssignment<'a, T, N>
impl<'a, T, const N: usize> Unpin for PendingAssignment<'a, T, N>
impl<'a, T, const N: usize> !UnwindSafe for PendingAssignment<'a, T, N>
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self
to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self
to an expression for Diesel’s query builder. Read more