Skip to main content

PrepareWorkers

Struct PrepareWorkers 

Source
pub struct PrepareWorkers<Source, Role, Worker, Plan>
where Source: WorkerSource<Role, Worker, Plan>, Worker: Behavior + Send, Plan: ActivationPlan,
{ /* private fields */ }
Expand description

One non-empty ordered request for replacement worker submissions.

The request cannot report a prepared worker before its exact start is committed:

ⓘ
fn premature_submission<Source, Role, Worker, Plan>(
    request: behavior_actors::atomic::PrepareWorkers<Source, Role, Worker, Plan>,
    submission: behavior_actors::atomic::WorkerSubmission<Worker, Plan>,
)
where
    Source: behavior_actors::atomic::WorkerSource<Role, Worker, Plan>,
    Worker: behavior::Behavior + Send,
    Plan: behavior_actors::atomic::ActivationPlan,
{
    let _ = request.accept(submission);
}

Implementations§

Source§

impl<Source, Role, Worker, Plan> PrepareWorkers<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 first selected role before committing the start.

Source

pub fn start( self, ) -> (WorkerPreparationStarted, StartingWorkerPreparation<Source, Role, Worker, Plan>)

Commit one start and transfer the affine source to its first attempt.

The issued request is consumed, so another start receipt cannot be produced from the same source action.

Trait Implementations§

Source§

impl<Source, Role, Worker, Plan> ActionItem for PrepareWorkers<Source, Role, Worker, Plan>
where Source: WorkerSource<Role, Worker, Plan>, Role: Send + Sync, Worker: Behavior + Send, Plan: ActivationPlan,

Source§

type Custody = (Option<PrepareWorkers<Source, Role, Worker, Plan>>, Option<<PrepareWorkers<Source, Role, Worker, Plan> as ActionItem>::Reply>)

Source§

type Input<'a> = &'a mut Option<PrepareWorkers<Source, Role, Worker, Plan>> where Self: 'a

Source§

type Reply = ItemSettlement<PrepareWorkers<Source, Role, Worker, Plan>, <PrepareWorkers<Source, Role, Worker, Plan> as ActionItem>::Accepted, <PrepareWorkers<Source, Role, Worker, Plan> as ActionItem>::Rejection, <PrepareWorkers<Source, Role, Worker, Plan> as ActionItem>::Prerequisite>

Source§

type Accepted = WorkerPreparationStarted

Source§

type Rejection = Never

Source§

type Prerequisite = Never

Source§

fn prepare_interpretation( progress: &mut Option<InterpretationProgress<Self, Self::Custody, Self::Reply>>, )

Source§

fn interpretation_input<'a>( custody: &'a mut Self::Custody, ) -> Option<(Self::Input<'a>, &'a mut Option<Self::Reply>)>
where Self: 'a,

Source§

fn finish_interpretation( progress: &mut Option<InterpretationProgress<Self, Self::Custody, Self::Reply>>, )

Source§

fn retain_accepted(_: Self::Accepted) -> Option<Self::Accepted>

Keep an accepted value only while it still carries terminal custody. Read more
Source§

impl<Source, Role, Worker, Plan> SourceAction for PrepareWorkers<Source, Role, Worker, Plan>
where Source: WorkerSource<Role, Worker, Plan>, Role: Send + Sync, Worker: Behavior + Send, Plan: ActivationPlan,

Source§

type Source = PrepareWorkers<Source, Role, Worker, Plan>

Actor-owned ingress selection for the result.

Auto Trait Implementations§

§

impl<Source, Role, Worker, Plan> Freeze for PrepareWorkers<Source, Role, Worker, Plan>
where Source: Freeze,

§

impl<Source, Role, Worker, Plan> RefUnwindSafe for PrepareWorkers<Source, Role, Worker, Plan>
where Source: RefUnwindSafe, Role: RefUnwindSafe,

§

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

§

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

§

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

§

impl<Source, Role, Worker, Plan> UnsafeUnpin for PrepareWorkers<Source, Role, Worker, Plan>
where Source: UnsafeUnpin,

§

impl<Source, Role, Worker, Plan> UnwindSafe for PrepareWorkers<Source, Role, Worker, Plan>
where Source: UnwindSafe, Role: RefUnwindSafe,

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.