SetupStep

Trait SetupStep 

Source
pub trait SetupStep: Send + Sync {
    // Required methods
    fn step_id(&self) -> &str;
    fn description(&self) -> &str;
    fn check_prerequisites<'life0, 'life1, 'async_trait>(
        &'life0 self,
        context: &'life1 SetupContext,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn execute<'life0, 'life1, 'async_trait>(
        &'life0 self,
        context: &'life1 mut SetupContext,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn validate<'life0, 'life1, 'async_trait>(
        &'life0 self,
        context: &'life1 SetupContext,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided methods
    fn can_skip(&self, _context: &SetupContext) -> bool { ... }
    fn next_steps(&self, _context: &SetupContext) -> Vec<String> { ... }
}
Expand description

Individual setup step

Required Methods§

Source

fn step_id(&self) -> &str

Get step identifier

Source

fn description(&self) -> &str

Get step description

Source

fn check_prerequisites<'life0, 'life1, 'async_trait>( &'life0 self, context: &'life1 SetupContext, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Check if step prerequisites are met

Source

fn execute<'life0, 'life1, 'async_trait>( &'life0 self, context: &'life1 mut SetupContext, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Execute the setup step

Source

fn validate<'life0, 'life1, 'async_trait>( &'life0 self, context: &'life1 SetupContext, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Validate step results

Provided Methods§

Source

fn can_skip(&self, _context: &SetupContext) -> bool

Check if step can be skipped

Source

fn next_steps(&self, _context: &SetupContext) -> Vec<String>

Get next step recommendations

Implementors§