Skip to main content

DispatchBirth

Trait DispatchBirth 

Source
pub trait DispatchBirth<A: Address, Host>: ChildCreationProduct<A, ChildHead> + Sized {
    // Required method
    fn dispatch_birth(
        self,
        id: CreationId,
        route: A::Nonce,
        kind: CreationKind,
        host: &mut Host,
    ) -> impl Future<Output = ItemSettlement<RoutedCreation<A, Self>, <Self as ChildCreationProduct<A, ChildHead>>::Result, CreationRejection, Never>> + Send;
}
Expand description

Exhaustive static dispatch of one creation-only child sum.

This is an interpreter-facing derived construction, not another actor-model operation. Implementations must preserve the ID, route, and creation kind and call exactly one concrete EstablishChild implementation. ChildChoice provides the closed recursive heterogeneous sum. Dispatch futures are sendable; heterogeneous sums therefore require sendable alternatives, runtime routes, and child hosts.

Required Methods§

Source

fn dispatch_birth( self, id: CreationId, route: A::Nonce, kind: CreationKind, host: &mut Host, ) -> impl Future<Output = ItemSettlement<RoutedCreation<A, Self>, <Self as ChildCreationProduct<A, ChildHead>>::Result, CreationRejection, Never>> + Send

Select exactly one concrete child host while preserving creation data in every non-accepted settlement.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<A, Child, Host> DispatchBirth<A, Host> for Child
where A: Address, Child: CreateSelectedChild<A, ChildHead, Host>,