pub struct Actions<A: Address, Ph, Sends, Birth: BirthMode> {
pub sends: Sends,
pub creates: Vec<Create<A, Birth::Child>>,
pub become_: Become<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::InterpreterRequests 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
typed creation-observation request return the committed result rather than
the behavior’s intent. When creation is rejected, a same-action
child-observation request for its nonce is consumed without installing an
observation or emitting a child-stopped fact, while the creation-observation
request reports the rejection. A later creation cannot
inherit that consumed observation. Creation order is vector order, and each
concrete named send lane retains its own order; this contract does not
impose an order between independent lanes. Constructing a value remains
pure.
Fields§
§sends: Sends§creates: Vec<Create<A, Birth::Child>>§become_: Become<Ph>Implementations§
Source§impl<A: Address, Ph, Sends, Birth: BirthMode> Actions<A, Ph, Sends, Birth>
impl<A: Address, Ph, Sends, Birth: BirthMode> Actions<A, Ph, Sends, Birth>
Sourcepub fn map_sends<Mapped>(
self,
map: impl FnOnce(Sends) -> Mapped,
) -> Actions<A, Ph, Mapped, Birth>
pub fn map_sends<Mapped>( self, map: impl FnOnce(Sends) -> Mapped, ) -> Actions<A, Ph, Mapped, Birth>
Transform only the send effects, preserving creation order and the next-behavior verdict exactly.
Sourcepub fn map_become<NextPh>(
self,
map: impl FnOnce(Become<Ph>) -> Become<NextPh>,
) -> Actions<A, NextPh, Sends, Birth>
pub fn map_become<NextPh>( self, map: impl FnOnce(Become<Ph>) -> Become<NextPh>, ) -> Actions<A, NextPh, Sends, Birth>
Transform only the next-behavior verdict, preserving sends and creation order exactly.
Sourcepub fn with_send<Input, Path>(self, input: Input) -> Selfwhere
Sends: SendInput<Input, Path>,
pub fn with_send<Input, Path>(self, input: Input) -> Selfwhere
Sends: SendInput<Input, Path>,
Append one communication to its statically selected send lane.
This is a pure transformation of the send leg. It preserves creation
order and the exact continue, phase-change, or termination verdict.
Path is compile-time lane evidence; no runtime lookup is performed.
Source§impl<A: Address, Ph, Sends: SendEffects, Birth: BirthMode> Actions<A, Ph, Sends, Birth>
impl<A: Address, Ph, Sends: SendEffects, Birth: BirthMode> Actions<A, Ph, Sends, Birth>
Trait Implementations§
Source§impl<A, Ph, Sends, Birth, Input, Path> AppendSend<Input, Path> for Actions<A, Ph, Sends, Birth>
impl<A, Ph, Sends, Birth, Input, Path> AppendSend<Input, Path> for Actions<A, Ph, Sends, Birth>
Source§fn append_send(self, input: Input) -> Self
fn append_send(self, input: Input) -> Self
input exactly once and preserve creations and the next verdict.