Skip to main content

Actions

Struct Actions 

Source
pub struct Actions<A: Address, Ph, Sends, Birth: BirthMode> {
    pub sends: Sends,
    pub creates: Vec<Create<A, Birth::Child>>,
    pub become_: Become<A, Ph>,
}
Expand description

Bombay’s typed realization of the actor transition effects: communications, fresh actor creation, and next behavior or termination.

An interpreter resolves every fresh creation in creates before interpreting any ordinary delivery or crate::ServiceSends request in sends from this value. A successful resolution installs and binds the child; a rejected resolution binds nothing. This ordering lets a same-action crate::ObserveCreation request return the committed result rather than the behavior’s intent. When creation is rejected, a same-action crate::ObserveChild for its nonce is consumed without installing an observation or emitting crate::ChildStopped, while crate::ObserveCreation reports the rejection. A later creation cannot inherit that consumed observation. Creation order is vector order, and each concrete send lane retains its own order; this contract does not impose an order between independent lanes of a crate::SendProduct. Constructing a value remains pure.

Fields§

§sends: Sends§creates: Vec<Create<A, Birth::Child>>§become_: Become<A, Ph>

Implementations§

Source§

impl<A: Address, Ph, Sends, Birth: BirthMode> Actions<A, Ph, Sends, Birth>

Source

pub fn map_sends<Mapped>( self, map: impl FnOnce(Sends) -> Mapped, ) -> Actions<A, Ph, Mapped, Birth>

Transform only the send algebra, preserving creation order and the next-behavior verdict exactly.

Source

pub fn map_become<NextPh>( self, map: impl FnOnce(Become<A, Ph>) -> Become<A, NextPh>, ) -> Actions<A, NextPh, Sends, Birth>

Transform only the next-behavior verdict, preserving sends and creation order exactly.

Source§

impl<A: Address, Ph, Sends: SendAlgebra, Birth: BirthMode> Actions<A, Ph, Sends, Birth>

Source

pub const fn new( sends: Sends, creates: Vec<Create<A, Birth::Child>>, become_: Become<A, Ph>, ) -> Self

Source

pub fn just(become_: Become<A, Ph>) -> Self

Source

pub fn cont() -> Self

Source

pub fn stop(exit: Exit<A>) -> Self

Source

pub fn goto(phase: Ph) -> Self

Trait Implementations§

Source§

impl<A: Address, Ph, Sends, Birth: BirthMode> From<(Sends, Vec<Create<A, <Birth as BirthMode>::Child>>, Step<Ph, Exit<A>>)> for Actions<A, Ph, Sends, Birth>

Source§

fn from( (sends, creates, become_): (Sends, Vec<Create<A, Birth::Child>>, Become<A, Ph>), ) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<A, Ph, Sends, Birth> Freeze for Actions<A, Ph, Sends, Birth>
where Sends: Freeze, Ph: Freeze, A: Freeze,

§

impl<A, Ph, Sends, Birth> RefUnwindSafe for Actions<A, Ph, Sends, Birth>

§

impl<A, Ph, Sends, Birth> Send for Actions<A, Ph, Sends, Birth>
where Sends: Send, Ph: Send, A: Send, <A as Address>::Nonce: Send, <Birth as BirthMode>::Child: Send,

§

impl<A, Ph, Sends, Birth> Sync for Actions<A, Ph, Sends, Birth>
where Sends: Sync, Ph: Sync, A: Sync, <A as Address>::Nonce: Sync, <Birth as BirthMode>::Child: Sync,

§

impl<A, Ph, Sends, Birth> Unpin for Actions<A, Ph, Sends, Birth>
where Sends: Unpin, Ph: Unpin, A: Unpin, <A as Address>::Nonce: Unpin, <Birth as BirthMode>::Child: Unpin,

§

impl<A, Ph, Sends, Birth> UnsafeUnpin for Actions<A, Ph, Sends, Birth>
where Sends: UnsafeUnpin, Ph: UnsafeUnpin, A: UnsafeUnpin,

§

impl<A, Ph, Sends, Birth> UnwindSafe for Actions<A, Ph, Sends, Birth>
where Sends: UnwindSafe, Ph: UnwindSafe, A: UnwindSafe, <A as Address>::Nonce: UnwindSafe, <Birth as BirthMode>::Child: 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.