pub struct Actions<A: Address, Ph, Sends, Birth: BirthMode> {
pub sends: Sends,
pub creates: Creations<CreateChild<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.
Actions::interpret resolves every fresh creation in creates before the
named sends product. A committed resolution installs and binds the child;
a semantic rejection binds nothing but remains an accepted interpretation
receipt. This ordering lets a same-action crate::ChildDelivery or typed
creation-observation request use the authoritative result rather than
Behavior’s intent. Each child-operation interpreter returns Blocked only
when its exact binding prerequisite rejected, while independent later items
are still attempted. Interpreter corruption retains the factual prefix and
every exact remaining value. No later creation may inherit a failed binding.
Creation order is vector order, and named send products declare their own
stable order. Constructing a value remains pure.
Fields§
§sends: Sends§creates: Creations<CreateChild<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.
Sourcepub async fn interpret<Interpreter, RootEvent, Path>(
progress: &mut Option<InterpretationProgress<Self, <Self as ActionSettlements>::InterpretationCustody, <Self as ActionSettlements>::Settlements>>,
interpreter: &mut Interpreter,
)where
Ph: Send,
Sends: InterpretSends<Interpreter, RootEvent, Path>,
Birth: InterpretCreations<A, Interpreter, RootEvent, Path>,
Self: Send,
<Self as ActionSettlements>::Settlements: Send,
<Self as ActionSettlements>::InterpretationCustody: Send,
Interpreter: Send,
pub async fn interpret<Interpreter, RootEvent, Path>(
progress: &mut Option<InterpretationProgress<Self, <Self as ActionSettlements>::InterpretationCustody, <Self as ActionSettlements>::Settlements>>,
interpreter: &mut Interpreter,
)where
Ph: Send,
Sends: InterpretSends<Interpreter, RootEvent, Path>,
Birth: InterpretCreations<A, Interpreter, RootEvent, Path>,
Self: Send,
<Self as ActionSettlements>::Settlements: Send,
<Self as ActionSettlements>::InterpretationCustody: Send,
Interpreter: Send,
Borrow caller-owned action progress through one statically typed runtime.
Creation items are attempted in vector order before the named send product. Lawful creation rejection or blocking is retained and does not suppress sends; concrete child-operation interpreters decide whether an exact binding prerequisite was satisfied. Interpreter corruption stops traversal and retains every later creation and the complete send product as unattempted. The next-behavior verdict is never reconstructed.
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>
pub const fn new( sends: Sends, creates: Creations<CreateChild<A, Birth::Child>>, become_: Become<Ph>, ) -> Self
pub fn just(become_: Become<Ph>) -> Self
pub fn cont() -> Self
pub fn stop() -> Self
pub fn goto(phase: Ph) -> Self
Sourcepub fn create(creates: Creations<CreateChild<A, Birth::Child>>) -> Self
pub fn create(creates: Creations<CreateChild<A, Birth::Child>>) -> Self
Continue after staging the complete declared creation product.
Trait Implementations§
Source§impl<A, Ph, Sends, Birth> ActionSettlements for Actions<A, Ph, Sends, Birth>
impl<A, Ph, Sends, Birth> ActionSettlements for Actions<A, Ph, Sends, Birth>
type Settlements = ActionSettlement<<Birth as CreationSettlements<A>>::Settlements, <Sends as SendSettlements>::Settlements, Ph>
type SourceCustody = ((Option<SourceProgress<<Birth as CreationSettlements<A>>::Settlements, <Birth as CreationSettlements<A>>::SourceCustody>>, Option<SourceProgress<<Sends as SendSettlements>::Settlements, <Sends as SendSettlements>::SourceCustody>>), Step<Ph, Stopped>)
type InterpretationCustody = ((Option<InterpretationProgress<Creations<CreateChild<A, <Birth as BirthMode>::Child>>, <Birth as CreationSettlements<A>>::InterpretationCustody, <Birth as CreationSettlements<A>>::Settlements>>, Option<InterpretationProgress<Sends, <Sends as SendSettlements>::InterpretationCustody, <Sends as SendSettlements>::Settlements>>), Step<Ph, Stopped>)
fn prepare_interpretation( progress: &mut Option<InterpretationProgress<Self, Self::InterpretationCustody, Self::Settlements>>, )
fn finish_interpretation( progress: &mut Option<InterpretationProgress<Self, Self::InterpretationCustody, Self::Settlements>>, )
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.