pub struct SupervisorHandle { /* private fields */ }Expand description
Control of a running supervisor. Dropping it stops the supervisor and its child.
Implementations§
Source§impl SupervisorHandle
impl SupervisorHandle
Sourcepub fn status(&self) -> SupervisorStatus
pub fn status(&self) -> SupervisorStatus
The state now.
Sourcepub fn restart_now(&self)
pub fn restart_now(&self)
Ask for a start: a running child is stopped and counted as an exit (then the policy decides, so a policy that waits for demand starts at once); a child waiting for demand starts; an exhausted or stopped policy forgets its budget and starts. A pending backoff is left to run. Returns before the work is done.
Trait Implementations§
Source§impl Drop for SupervisorHandle
impl Drop for SupervisorHandle
Auto 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