pub trait Stages {
// Required methods
fn capabilities(&self) -> Capabilities;
async fn quiesce(&mut self, budget: Duration) -> Result<(), Error>;
async fn storage(&mut self) -> Result<(), Error>;
async fn drivers(&mut self) -> Result<(), Error>;
async fn finalize(
&mut self,
action: Action,
status: u8,
) -> Result<(), Error>;
}Expand description
Pipeline stages, executed in declaration order. Supervisor provides
the system implementation; tests and special runtimes may provide others.
Required Methods§
Sourcefn capabilities(&self) -> Capabilities
fn capabilities(&self) -> Capabilities
Power actions the final stage can perform.
Sourceasync fn quiesce(&mut self, budget: Duration) -> Result<(), Error>
async fn quiesce(&mut self, budget: Duration) -> Result<(), Error>
Reject new work, ask tasks and guests to stop and join them before a
monotonic deadline budget from now. On timeout return
Error::Timeout and keep every resource referenced by live tasks.
Sourceasync fn storage(&mut self) -> Result<(), Error>
async fn storage(&mut self) -> Result<(), Error>
Freeze writes, require closed handles, flush, unmount secondary mounts before root and sync the backing devices.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.