pub struct PendingWorkerPreparation<Source, Role, Worker, Plan>{ /* private fields */ }Expand description
Non-empty remainder of one exact worker-preparation request.
Once the first worker submission has been accepted, a later failure is a worker rejection; the source cannot be reclassified as rejected:
ⓘ
fn late_source_rejection<Source, Role, Worker, Plan>(
pending: behavior_actors::atomic::PendingWorkerPreparation<Source, Role, Worker, Plan>,
reason: Source::SourceRejection,
)
where
Source: behavior_actors::atomic::WorkerSource<Role, Worker, Plan>,
Worker: behavior::Behavior + Send,
Plan: behavior_actors::atomic::ActivationPlan,
{
let _ = pending.reject_source(reason);
}Implementations§
Source§impl<Source, Role, Worker, Plan> PendingWorkerPreparation<Source, Role, Worker, Plan>
impl<Source, Role, Worker, Plan> PendingWorkerPreparation<Source, Role, Worker, Plan>
Sourcepub fn source_and_role(&mut self) -> (&mut Source, &Role)
pub fn source_and_role(&mut self) -> (&mut Source, &Role)
Borrow the source and current application role for one Bombay-owned preparation attempt.
Sourcepub fn prepared_workers(&self) -> impl Iterator<Item = (&Role, &Worker, &Plan)>
pub fn prepared_workers(&self) -> impl Iterator<Item = (&Role, &Worker, &Plan)>
Borrow each accepted role, original worker, and activation plan in order.
The complete pending request, including its original preparation ticket, remains owned by the caller. No submission is cloned or transferred.
Sourcepub fn remaining_roles(&self) -> impl Iterator<Item = &Role>
pub fn remaining_roles(&self) -> impl Iterator<Item = &Role>
Borrow the untouched roles after the current role in their original order.
The existing source_and_role method supplies the source and current role.
Sourcepub fn accept(
self,
submission: WorkerSubmission<Worker, Plan>,
) -> ControlFlow<WorkerPreparation<Source, Role, Worker, Plan>, PendingWorkerPreparation<Source, Role, Worker, Plan>>
pub fn accept( self, submission: WorkerSubmission<Worker, Plan>, ) -> ControlFlow<WorkerPreparation<Source, Role, Worker, Plan>, PendingWorkerPreparation<Source, Role, Worker, Plan>>
Accept one submission for the current role.
Sourcepub fn reject(
self,
reason: Source::WorkerRejection,
) -> WorkerPreparation<Source, Role, Worker, Plan>
pub fn reject( self, reason: Source::WorkerRejection, ) -> WorkerPreparation<Source, Role, Worker, Plan>
Return an exact rejection for the current role.
Auto Trait Implementations§
impl<Source, Role, Worker, Plan> Freeze for PendingWorkerPreparation<Source, Role, Worker, Plan>where
Source: Freeze,
impl<Source, Role, Worker, Plan> RefUnwindSafe for PendingWorkerPreparation<Source, Role, Worker, Plan>
impl<Source, Role, Worker, Plan> Send for PendingWorkerPreparation<Source, Role, Worker, Plan>
impl<Source, Role, Worker, Plan> Sync for PendingWorkerPreparation<Source, Role, Worker, Plan>
impl<Source, Role, Worker, Plan> Unpin for PendingWorkerPreparation<Source, Role, Worker, Plan>
impl<Source, Role, Worker, Plan> UnsafeUnpin for PendingWorkerPreparation<Source, Role, Worker, Plan>where
Source: UnsafeUnpin,
impl<Source, Role, Worker, Plan> UnwindSafe for PendingWorkerPreparation<Source, Role, Worker, Plan>
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