pub struct ChildSpec {
pub name: String,
pub function: u32,
pub args: Vec<Value>,
pub restart: RestartPolicy,
}Expand description
A child the supervisor should start (and possibly restart).
function is an index into the runtime’s chunk — the same number
super::runtime::Runtime::spawn takes. Args are cloned on every
restart so a child always comes back with the original call.
Non-empty Self::name is registered as register_name → an addressing
Cap (crate::CapRights::ADDRESSING) for that incarnation (swept on exit,
re-bound on restart).
Fields§
§name: String§function: u32§args: Vec<Value>§restart: RestartPolicyImplementations§
Trait Implementations§
Auto Trait Implementations§
impl Forget for ChildSpec
impl Freeze for ChildSpec
impl Move for ChildSpec
impl RefUnwindSafe for ChildSpec
impl Send for ChildSpec
impl Sync for ChildSpec
impl Unpin for ChildSpec
impl UnsafeUnpin for ChildSpec
impl UnwindSafe for ChildSpec
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