pub trait Module: Send + Sync {
// Required method
fn run<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ModuleResult, ModuleError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn options_json(&self) -> Value { ... }
fn dry_run<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ModuleResult, ModuleError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn set_option(
&mut self,
_name: &str,
_value: &str,
) -> Result<(), ModuleError> { ... }
fn validate(&self) -> Result<(), ModuleError> { ... }
}Required Methods§
fn run<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ModuleResult, ModuleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
fn options_json(&self) -> Value
Sourcefn dry_run<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ModuleResult, ModuleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn dry_run<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ModuleResult, ModuleError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Preview the module’s output without side effects (no network I/O). Used by the executor to enforce DenyPayload rules pre-execution.
fn set_option(&mut self, _name: &str, _value: &str) -> Result<(), ModuleError>
fn validate(&self) -> Result<(), ModuleError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".