Skip to main content

PluginStep

Trait PluginStep 

Source
pub trait PluginStep: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        step_def: &'life1 StepDef,
        config: &'life2 StepConfig,
        context: &'life3 Context,
    ) -> Pin<Box<dyn Future<Output = Result<StepOutput, StepError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn validate(&self, config: &StepConfig) -> Result<(), StepError>;
    fn config_schema(&self) -> PluginConfigSchema;
}
Expand description

Trait that all plugins must implement

Required Methods§

Source

fn name(&self) -> &str

Unique name identifying this plugin (used as step type in YAML)

Source

fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, step_def: &'life1 StepDef, config: &'life2 StepConfig, context: &'life3 Context, ) -> Pin<Box<dyn Future<Output = Result<StepOutput, StepError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Execute the plugin step

Source

fn validate(&self, config: &StepConfig) -> Result<(), StepError>

Validate that the step config satisfies this plugin’s requirements

Source

fn config_schema(&self) -> PluginConfigSchema

Return the configuration schema for this plugin

Implementors§