Skip to main content

AssignWorker

Struct AssignWorker 

Source
pub struct AssignWorker<P, Job>
where P: Protocol<Msg = Assignment<Job>>, P::Addr: RecipientAddress,
{ /* private fields */ }
Expand description

One exact direct-worker delivery whose complete settlement returns to its pool.

Implementations§

Source§

impl<P, Job> AssignWorker<P, Job>
where P: Protocol<Msg = Assignment<Job>>, P::Addr: RecipientAddress,

Source

pub fn target(&self) -> EstablishedRecipient<P>

Return a clone of the exact worker recipient selected by the pool. The assignment and its accepted receipt remain inside this request.

Source

pub async fn settle<Host, RootEvent, Path>( progress: &mut Option<InterpretationProgress<Self, <Self as ActionItem>::Custody, ItemSettlement<Self, AssignmentReceipt, ExactDeliveryReason, Never>>>, host: &mut Host, )
where Host: InterpretItem<EstablishedDelivery<P>, RootEvent, Path>, <P::Addr as RecipientAddress>::Established<P>: Send, Job: Send,

Attempt the lower worker delivery while the complete request or partial assignment receipt remains in the caller’s original interpretation slot.

Trait Implementations§

Source§

impl<P, Job> ActionItem for AssignWorker<P, Job>
where P: Protocol<Msg = Assignment<Job>>, P::Addr: RecipientAddress, <P::Addr as RecipientAddress>::Established<P>: Send, Job: Send,

Source§

type Custody = (AssignmentReceipt, (Option<EstablishedDelivery<P>>, Option<<AssignWorker<P, Job> as ActionItem>::Reply>))

Source§

type Input<'a> = &'a mut Option<EstablishedDelivery<P>> where Self: 'a

Source§

type Reply = ItemSettlement<EstablishedDelivery<P>, (), ExactDeliveryReason, Never>

Source§

type Accepted = AssignmentReceipt

Source§

type Rejection = ExactDeliveryReason

Source§

type Prerequisite = Never

Source§

fn prepare_interpretation( progress: &mut Option<InterpretationProgress<Self, Self::Custody, ItemSettlement<Self, Self::Accepted, Self::Rejection, Self::Prerequisite>>>, )

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, ItemSettlement<Self, Self::Accepted, Self::Rejection, Self::Prerequisite>>>, )

Source§

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

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

impl<P, Job> SourceAction for AssignWorker<P, Job>
where P: Protocol<Msg = Assignment<Job>>, P::Addr: RecipientAddress, <P::Addr as RecipientAddress>::Established<P>: Send, Job: Send,

Source§

type Source = AssignWorker<P, Job>

Actor-owned ingress selection for the result.

Auto Trait Implementations§

§

impl<P, Job> Freeze for AssignWorker<P, Job>
where <P as Protocol>::Addr: Sized, <<P as Protocol>::Addr as RecipientAddress>::Established<P>: Freeze, Job: Freeze,

§

impl<P, Job> RefUnwindSafe for AssignWorker<P, Job>

§

impl<P, Job> Send for AssignWorker<P, Job>
where <P as Protocol>::Addr: Sized, <<P as Protocol>::Addr as RecipientAddress>::Established<P>: Send, Job: Send,

§

impl<P, Job> Sync for AssignWorker<P, Job>
where <P as Protocol>::Addr: Sized, <<P as Protocol>::Addr as RecipientAddress>::Established<P>: Sync, Job: Sync,

§

impl<P, Job> Unpin for AssignWorker<P, Job>
where <P as Protocol>::Addr: Sized, <<P as Protocol>::Addr as RecipientAddress>::Established<P>: Unpin, Job: Unpin,

§

impl<P, Job> UnsafeUnpin for AssignWorker<P, Job>

§

impl<P, Job> UnwindSafe for AssignWorker<P, Job>

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.