pub trait ModuleProcessLiveness: Send + Sync {
// Required method
fn process_live(&self, module_id: &str) -> Option<bool>;
// Provided method
fn process_replacing(&self, _module_id: &str) -> bool { ... }
}Required Methods§
fn process_live(&self, module_id: &str) -> Option<bool>
Provided Methods§
Sourcefn process_replacing(&self, _module_id: &str) -> bool
fn process_replacing(&self, _module_id: &str) -> bool
Whether the supervisor is replacing this module’s process right now: an operator restart or reload, a health restart, or a crash respawn whose backoff is running. A module in that state is not live, but a consumer refused now should retry shortly rather than treat the target as gone. Stopped, failed, and disabled modules are not replacing.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".