pub trait Startup<Q = Self>: Sized {
type Error;
type Target;
// Required method
fn failed(target: &Self::Target);
// Provided methods
fn installed(&self) -> Result<(), Self::Error> { ... }
fn observed(&self, _request: Requested<Q>) -> ControlFlow<()> { ... }
fn target(&self) -> Option<&Self::Target> { ... }
}Expand description
Lifecycle behavior selected by an executor’s shutdown source.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn installed(&self) -> Result<(), Self::Error>
fn installed(&self) -> Result<(), Self::Error>
Publishes installation readiness or preserves its exact notification failure.
Sourcefn observed(&self, _request: Requested<Q>) -> ControlFlow<()>
fn observed(&self, _request: Requested<Q>) -> ControlFlow<()>
Observes the registered shutdown source becoming ready.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".