pub enum EstablishedCreation<C, Occurrence>{
Installed(CommittedChild<C, Occurrence>),
Rejected {
id: CreationId,
kind: CreationKind,
reason: CreationRejection,
occurrence: PhantomData<fn() -> Occurrence>,
},
}Expand description
Committed or rejected result for one exact concrete child occurrence.
Installed is constructed only after fresh allocation, successful
initialization, endpoint establishment, and creator-local binding. It returns the
exact installed actor. Rejected carries no capability, so a
failed request cannot be used as an established destination. Both variants
preserve Behavior-authored creation provenance.
Occurrence is topology navigation evidence authored by the parent. It
distinguishes duplicate occurrences without becoming another protocol
identity or runtime key. A consumer that only sends messages may project
the protocol recipient without retaining the installed actor.
A rejected named report has no actor capability to extract:
fn rejected_actor<C, Occurrence>(report: behavior::EstablishedCreation<C, Occurrence>)
where
C: behavior::Behavior,
behavior::BehaviorAddr<C>: behavior::EndpointAddress,
{
let behavior::EstablishedCreation::Rejected { actor, .. } = report else { return; };
let _: behavior::EstablishedActor<C> = actor;
}Duplicate occurrences remain incompatible even when their protocols and endpoint representations match:
fn wrong_occurrence<C, Primary, Backup>(backup: behavior::EstablishedCreation<C, Backup>)
where
C: behavior::Behavior,
behavior::BehaviorAddr<C>: behavior::EndpointAddress,
{
let _: behavior::EstablishedCreation<C, Primary> = backup;
}Variants§
Installed(CommittedChild<C, Occurrence>)
Rejected
Fields
id: CreationIdkind: CreationKindreason: CreationRejectionoccurrence: PhantomData<fn() -> Occurrence>Implementations§
Source§impl<C, Occurrence> EstablishedCreation<C, Occurrence>
impl<C, Occurrence> EstablishedCreation<C, Occurrence>
pub const fn installed(child: CommittedChild<C, Occurrence>) -> Self
pub const fn rejected( id: CreationId, kind: CreationKind, reason: CreationRejection, ) -> Self
pub const fn id(&self) -> CreationId
pub const fn kind(&self) -> CreationKind
Sourcepub fn into_recipient(
self,
) -> Result<EstablishedRecipient<C::Protocol>, CreationRejection>
pub fn into_recipient( self, ) -> Result<EstablishedRecipient<C::Protocol>, CreationRejection>
Consume the report and return its exact endpoint capability.
§Errors
Returns the original CreationRejection when child creation did not
commit.
Sourcepub fn into_committed(
self,
) -> Result<CommittedChild<C, Occurrence>, CreationRejection>
pub fn into_committed( self, ) -> Result<CommittedChild<C, Occurrence>, CreationRejection>
Transfer the concrete committed child without recreating authority from a protocol recipient.
§Errors
Returns the original CreationRejection when child creation did not
commit.