Skip to main content

Drain

Trait Drain 

Source
pub trait Drain: Module {
    type Error;

    // Required method
    fn drain(&mut self, context: &LifecycleContext) -> Result<(), Self::Error>;
}
Expand description

Opts a module into graceful shutdown before it is stopped.

Required Associated Types§

Source

type Error

An implementation-defined drain error.

Required Methods§

Source

fn drain(&mut self, context: &LifecycleContext) -> Result<(), Self::Error>

Finishes accepted work after process admission has closed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§