Skip to main content

ChildCreationOutcome

Enum ChildCreationOutcome 

Source
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.

§error: C::Error

Exact error returned by the child’s initialization transition.

§

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: CreationRejection

Exact reason the host could not commit this child.

Implementations§

Source§

impl<C, Occurrence> ChildCreationOutcome<C, Occurrence>

Source

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.

Auto Trait Implementations§

§

impl<C, Occurrence> Freeze for ChildCreationOutcome<C, Occurrence>
where <<C as Behavior>::Protocol as Protocol>::Addr: Sized, EstablishedCreation<<C as Behavior>::Protocol, Occurrence>: Freeze, RoutedCreation<<<C as Behavior>::Protocol as Protocol>::Addr, C>: Freeze, <C as Behavior>::Error: Freeze, Actions<<<C as Behavior>::Protocol as Protocol>::Addr, <C as Behavior>::Ph, <C as Behavior>::Sends, <C as Behavior>::Birth>: Freeze,

§

impl<C, Occurrence> RefUnwindSafe for ChildCreationOutcome<C, Occurrence>
where <<C as Behavior>::Protocol as Protocol>::Addr: Sized, EstablishedCreation<<C as Behavior>::Protocol, Occurrence>: RefUnwindSafe, RoutedCreation<<<C as Behavior>::Protocol as Protocol>::Addr, C>: RefUnwindSafe, <C as Behavior>::Error: RefUnwindSafe, Actions<<<C as Behavior>::Protocol as Protocol>::Addr, <C as Behavior>::Ph, <C as Behavior>::Sends, <C as Behavior>::Birth>: RefUnwindSafe,

§

impl<C, Occurrence> Send for ChildCreationOutcome<C, Occurrence>
where <<C as Behavior>::Protocol as Protocol>::Addr: Sized, EstablishedCreation<<C as Behavior>::Protocol, Occurrence>: Send, RoutedCreation<<<C as Behavior>::Protocol as Protocol>::Addr, C>: Send, <C as Behavior>::Error: Send, Actions<<<C as Behavior>::Protocol as Protocol>::Addr, <C as Behavior>::Ph, <C as Behavior>::Sends, <C as Behavior>::Birth>: Send,

§

impl<C, Occurrence> Sync for ChildCreationOutcome<C, Occurrence>
where <<C as Behavior>::Protocol as Protocol>::Addr: Sized, EstablishedCreation<<C as Behavior>::Protocol, Occurrence>: Sync, RoutedCreation<<<C as Behavior>::Protocol as Protocol>::Addr, C>: Sync, <C as Behavior>::Error: Sync, Actions<<<C as Behavior>::Protocol as Protocol>::Addr, <C as Behavior>::Ph, <C as Behavior>::Sends, <C as Behavior>::Birth>: Sync,

§

impl<C, Occurrence> Unpin for ChildCreationOutcome<C, Occurrence>
where <<C as Behavior>::Protocol as Protocol>::Addr: Sized, EstablishedCreation<<C as Behavior>::Protocol, Occurrence>: Unpin, RoutedCreation<<<C as Behavior>::Protocol as Protocol>::Addr, C>: Unpin, <C as Behavior>::Error: Unpin, Actions<<<C as Behavior>::Protocol as Protocol>::Addr, <C as Behavior>::Ph, <C as Behavior>::Sends, <C as Behavior>::Birth>: Unpin,

§

impl<C, Occurrence> UnsafeUnpin for ChildCreationOutcome<C, Occurrence>
where <<C as Behavior>::Protocol as Protocol>::Addr: Sized, EstablishedCreation<<C as Behavior>::Protocol, Occurrence>: UnsafeUnpin, RoutedCreation<<<C as Behavior>::Protocol as Protocol>::Addr, C>: UnsafeUnpin, <C as Behavior>::Error: UnsafeUnpin, Actions<<<C as Behavior>::Protocol as Protocol>::Addr, <C as Behavior>::Ph, <C as Behavior>::Sends, <C as Behavior>::Birth>: UnsafeUnpin,

§

impl<C, Occurrence> UnwindSafe for ChildCreationOutcome<C, Occurrence>
where <<C as Behavior>::Protocol as Protocol>::Addr: Sized, EstablishedCreation<<C as Behavior>::Protocol, Occurrence>: UnwindSafe, RoutedCreation<<<C as Behavior>::Protocol as Protocol>::Addr, C>: UnwindSafe, <C as Behavior>::Error: UnwindSafe, Actions<<<C as Behavior>::Protocol as Protocol>::Addr, <C as Behavior>::Ph, <C as Behavior>::Sends, <C as Behavior>::Birth>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.