Skip to main content

Initialize

Trait Initialize 

Source
pub trait Initialize: Module {
    type Error;

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

Opts a module into resource preparation before its process starts.

Required Associated Types§

Source

type Error

An implementation-defined preparation error.

Required Methods§

Source

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

Prepares resources; this does not mean the module is accepting work.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§