1 2 3 4 5 6 7 8 9 10 11 12 13
use super::*; use async_trait::async_trait; #[async_trait] pub trait End<H: AknShutdown<Self> + Send + 'static>: Terminating<H> { async fn end(mut self, mut status: Result<(), Need>, mut supervisor: Option<H>) { status = self.terminating(status, &mut supervisor).await; // aknowledge_shutdown to supervisor if provided if let Some(my_supervisor) = supervisor { my_supervisor.aknowledge_shutdown(self, status).await; } } }