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§
impl<A: Eq + Address, New: Eq> Eq for CreateChild<A, New>
impl<A: PartialEq + Address, New: PartialEq> StructuralPartialEq for CreateChild<A, New>
Auto Trait Implementations§
impl<A, New> Freeze for CreateChild<A, New>
impl<A, New> RefUnwindSafe for CreateChild<A, New>
impl<A, New> Send for CreateChild<A, New>
impl<A, New> Sync for CreateChild<A, New>
impl<A, New> Unpin for CreateChild<A, New>
impl<A, New> UnsafeUnpin for CreateChild<A, New>
impl<A, New> UnwindSafe for CreateChild<A, New>
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