pub enum ChildCreationOutcome<C, Occurrence>{
Established(CommittedChild<C, Occurrence>),
InitializationRejected {
creation: RoutedCreation<BehaviorAddr<C>, C>,
error: C::Error,
},
InitializationPanicked {
creation: RoutedCreation<BehaviorAddr<C>, C>,
},
HostRejected {
creation: RoutedCreation<BehaviorAddr<C>, C>,
initialization: Actions<BehaviorAddr<C>, C::Ph, C::Sends, C::Birth>,
reason: CreationRejection,
},
}Expand description
Complete result after a runtime accepts one child definition.
A created child leaves only its exact established capability. Rejection during the pure initialization transition returns the current child and its exact error. A caught panic returns the extant current child without claiming an error or successful actions. Rejection while establishing the host returns the current child and the still-uninterpreted initialization actions. No variant reconstructs a pre-initialization value or silently discards an affine action.
A failed child installation returns current work and no installed actor:
fn rejected_actor<C, Occurrence>(outcome: behavior::ChildCreationOutcome<C, Occurrence>)
where
C: behavior::Behavior,
behavior::BehaviorAddr<C>: behavior::EndpointAddress,
{
if let behavior::ChildCreationOutcome::HostRejected { actor, .. } = outcome {
let _: behavior::EstablishedActor<C> = actor;
}
}Variants§
Established(CommittedChild<C, Occurrence>)
Fresh child creation committed successfully.
InitializationRejected
The child’s pure initialization transition rejected before host commit.
Fields
creation: RoutedCreation<BehaviorAddr<C>, C>Current child value with its creator correlation and private route.
InitializationPanicked
The child’s pure initialization panicked before any host commitment.
Only the outer routed child that survived Rust unwinding is returned; this does not promise recovery of values destroyed inside user code.
Fields
creation: RoutedCreation<BehaviorAddr<C>, C>Current child value with its creator correlation and private route.
HostRejected
Host establishment rejected after initialization produced actions.
Fields
creation: RoutedCreation<BehaviorAddr<C>, C>Current child value with its creator correlation and private route.
initialization: Actions<BehaviorAddr<C>, C::Ph, C::Sends, C::Birth>Complete initialization actions that were never interpreted.
reason: CreationRejectionExact reason the host could not commit this child.
Implementations§
Source§impl<C, Occurrence> ChildCreationOutcome<C, Occurrence>
impl<C, Occurrence> ChildCreationOutcome<C, Occurrence>
Sourcepub fn into_committed(self) -> Result<CommittedChild<C, Occurrence>, Self>
pub fn into_committed(self) -> Result<CommittedChild<C, Occurrence>, Self>
Consume a committed child result into its exact concrete actor capability.
The committed variant directly owns the actor, ID, kind, and occurrence; no nested rejection can appear under success.
§Errors
Returns the complete original result when creation did not commit.
Sourcepub fn into_actor(self) -> Result<EstablishedActor<C>, Self>
pub fn into_actor(self) -> Result<EstablishedActor<C>, Self>
Consume a committed child into its exact actor.
§Errors
Returns the complete original result when creation did not commit.