pub enum ChildCreationOutcome<C, Occurrence>{
Established {
established: EstablishedCreation<C::Protocol, Occurrence>,
},
InitializationRejected {
creation: RoutedCreation<BehaviorAddr<C>, C>,
error: C::Error,
},
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. 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.
Variants§
Established
Fresh child creation committed successfully.
Fields
established: EstablishedCreation<C::Protocol, Occurrence>Exact capability and creation provenance for this occurrence.
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.
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_actor(self) -> Result<EstablishedActor<C>, Self>
pub fn into_actor(self) -> Result<EstablishedActor<C>, Self>
Consume a committed child result into its exact concrete actor capability.
The enclosing ChildCreationOutcome<C, Occurrence> already proves which
concrete behavior was created. A protocol recipient is therefore
strengthened only to EstablishedActor<C>; callers cannot select a
different behavior sharing the same protocol.
§Errors
Returns the complete original result when creation did not commit.