pub struct Supervisor { /* private fields */ }Expand description
Manages a set of tasks, ensuring they remain operational through restarts.
The Supervisor spawns each task with monitoring to detect failures.
If a task fails, it is restarted with an exponential backoff.
User commands such as adding, restarting, or killing tasks are supported via the SupervisorHandle.
Implementations§
Source§impl Supervisor
impl Supervisor
Sourcepub fn run(self) -> SupervisorHandle
pub fn run(self) -> SupervisorHandle
Runs the supervisor, consuming it and returning a handle for external control.
Auto Trait Implementations§
impl Freeze for Supervisor
impl !RefUnwindSafe for Supervisor
impl Send for Supervisor
impl !Sync for Supervisor
impl Unpin for Supervisor
impl UnsafeUnpin for Supervisor
impl !UnwindSafe for Supervisor
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