Skip to main content

Stages

Trait Stages 

Source
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§

Source

fn capabilities(&self) -> Capabilities

Power actions the final stage can perform.

Source

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.

Source

async fn storage(&mut self) -> Result<(), Error>

Freeze writes, require closed handles, flush, unmount secondary mounts before root and sync the backing devices.

Source

async fn drivers(&mut self) -> Result<(), Error>

Stop drivers in dependency order without touching unmounted storage.

Source

async fn finalize(&mut self, action: Action, status: u8) -> Result<(), Error>

Perform the hardware action. May not return.

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.

Implementors§