Skip to main content

StartingWorkerPreparation

Struct StartingWorkerPreparation 

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

Source work after one accepted start and before its first submission.

Only this phase can return a source rejection. Once it accepts a first submission, the returned pending request has a nonempty prepared prefix and can report only worker-specific rejection for later roles.

Implementations§

Source§

impl<Source, Role, Worker, Plan> StartingWorkerPreparation<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 application role.

Source

pub fn accept( self, submission: WorkerSubmission<Worker, Plan>, ) -> ControlFlow<WorkerPreparation<Source, Role, Worker, Plan>, PendingWorkerPreparation<Source, Role, Worker, Plan>>

Accept the first submission and advance or complete the ordered group.

Source

pub fn reject( self, reason: Source::WorkerRejection, ) -> WorkerPreparation<Source, Role, Worker, Plan>

Return an exact worker rejection for the first selected role.

Source

pub fn reject_source( self, reason: Source::SourceRejection, ) -> WorkerPreparation<Source, Role, Worker, Plan>

Return the source and its exact rejection before any worker submission.

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

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

§

impl<Source, Role, Worker, Plan> UnwindSafe for StartingWorkerPreparation<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.