pub struct SupervisorHandle { /* private fields */ }Expand description
Thread-safe wrapper for supervisor operations.
Implementations§
Source§impl SupervisorHandle
impl SupervisorHandle
Sourcepub fn new(supervisor: Supervisor) -> Self
pub fn new(supervisor: Supervisor) -> Self
Create a new handle wrapping a supervisor.
Sourcepub fn start_child(&self, spec: ChildSpec) -> Result<ActorId>
pub fn start_child(&self, spec: ChildSpec) -> Result<ActorId>
Start a child actor.
Sourcepub fn stop_child(&self, name: &str) -> Result<()>
pub fn stop_child(&self, name: &str) -> Result<()>
Stop a child actor.
Sourcepub fn count_children(&self) -> SupervisorStats
pub fn count_children(&self) -> SupervisorStats
Get child statistics.
Sourcepub fn which_children(&self) -> Vec<SupervisedChild>
pub fn which_children(&self) -> Vec<SupervisedChild>
Get all children.
Trait Implementations§
Source§impl Clone for SupervisorHandle
impl Clone for SupervisorHandle
Source§fn clone(&self) -> SupervisorHandle
fn clone(&self) -> SupervisorHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for SupervisorHandle
impl !UnwindSafe for SupervisorHandle
impl Freeze for SupervisorHandle
impl Send for SupervisorHandle
impl Sync for SupervisorHandle
impl Unpin for SupervisorHandle
impl UnsafeUnpin for SupervisorHandle
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