pub struct CreateChild<A: Address, New> { /* private fields */ }Expand description
A staged request to establish one fresh child.
The ID is correlation within the request’s static child occurrence, not an address, route, actor identity, or proof of freshness. The kind is Behavior-owned intent. Replacement at an existing address is deliberately absent; stable identity is derived with a proxy actor.
ⓘ
let mut creations = behavior::CreationSequence::new();
let id = creations.issue().expect("the first child ID exists");
let _ = behavior::CreateChild::<behavior::MailAddr, ()>::new(
id,
(),
behavior::CreationKind::Birth,
);Implementations§
Source§impl<A: Address, New> CreateChild<A, New>
impl<A: Address, New> CreateChild<A, New>
pub const fn birth(id: CreationId, child: New) -> Self
pub const fn replacement( id: CreationId, previous: CreationId, child: New, ) -> Self
pub const fn id(&self) -> CreationId
pub const fn kind(&self) -> CreationKind
pub const fn child(&self) -> &New
Sourcepub fn into_parts(self) -> (CreationId, New, CreationKind)
pub fn into_parts(self) -> (CreationId, New, CreationKind)
Consume the staged request, returning its exact correlation, child, and creation provenance to the interpreter.
Taking these parts does not establish a child actor. The interpreter remains responsible for fresh creation and for returning owned work on rejection.
Trait Implementations§
Source§impl<A: Clone + Address, New: Clone> Clone for CreateChild<A, New>
impl<A: Clone + Address, New: Clone> Clone for CreateChild<A, New>
Source§fn clone(&self) -> CreateChild<A, New>
fn clone(&self) -> CreateChild<A, New>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<A: Eq + Address, New: Eq> Eq for CreateChild<A, New>
impl<A: Address, New> StructuralPartialEq for CreateChild<A, New>
Auto Trait Implementations§
impl<A, New> Freeze for CreateChild<A, New>where
New: Freeze,
impl<A, New> RefUnwindSafe for CreateChild<A, New>where
New: RefUnwindSafe,
impl<A, New> Send for CreateChild<A, New>where
New: Send,
impl<A, New> Sync for CreateChild<A, New>where
New: Sync,
impl<A, New> Unpin for CreateChild<A, New>where
New: Unpin,
impl<A, New> UnsafeUnpin for CreateChild<A, New>where
New: UnsafeUnpin,
impl<A, New> UnwindSafe for CreateChild<A, New>where
New: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more