pub struct Supervisor { /* private fields */ }Expand description
Runtime that owns service lifecycle, restart policy, and coordinated shutdown.
Implementations§
Source§impl Supervisor
impl Supervisor
Sourcepub fn readiness(&self) -> Receiver<SupervisorReadiness>
pub fn readiness(&self) -> Receiver<SupervisorReadiness>
Subscribes to aggregate startup readiness.
The receiver starts at SupervisorReadiness::Ready when no service is
startup-gated, or SupervisorReadiness::Pending until every gated
service crosses its startup gate.
Sourcepub async fn run(self) -> Result<RunSummary, Error>
pub async fn run(self) -> Result<RunSummary, Error>
Runs all registered services until they complete or policy triggers
shutdown, then returns a final RunSummary.
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