Skip to main content

PendingWorkerPreparation

Struct PendingWorkerPreparation 

Source
pub struct PendingWorkerPreparation<Source, Role, Worker, Plan>
where Source: WorkerSource<Role, Worker, Plan>, Worker: Behavior + Send, Plan: ActivationPlan,
{ /* 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>
where Source: WorkerSource<Role, Worker, Plan>, Worker: Behavior + Send, Plan: ActivationPlan,

Source

pub fn source_and_role(&mut self) -> (&mut Source, &Role)

Borrow the source and current application role for one Bombay-owned preparation attempt.

Source

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.

Source

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.

Source

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.

Source

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>
where Source: RefUnwindSafe, Role: RefUnwindSafe, Worker: RefUnwindSafe, Plan: RefUnwindSafe,

§

impl<Source, Role, Worker, Plan> Send for PendingWorkerPreparation<Source, Role, Worker, Plan>
where Role: Sync + Send,

§

impl<Source, Role, Worker, Plan> Sync for PendingWorkerPreparation<Source, Role, Worker, Plan>
where Source: Sync, Role: Sync + Send, Worker: Sync, Plan: Sync,

§

impl<Source, Role, Worker, Plan> Unpin for PendingWorkerPreparation<Source, Role, Worker, Plan>
where Source: Unpin, Worker: Unpin, Plan: Unpin,

§

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>
where Source: UnwindSafe, Role: RefUnwindSafe, Worker: UnwindSafe, Plan: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.