pub trait ModuleTrait: Send + Sync {
// Required methods
fn name(&self) -> String;
fn version(&self) -> i32;
fn default_arc() -> Arc<dyn ModuleTrait> ⓘ
where Self: Sized;
// Provided methods
fn should_login(&self) -> bool { ... }
fn headers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Headers> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn cookies<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Cookies> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn dag_definition<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<ModuleDagDefinition>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn add_step<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<Arc<dyn ModuleNodeTrait>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn pre_process<'life0, 'async_trait>(
&'life0 self,
_config: Option<Arc<ModuleConfig>>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn post_process<'life0, 'async_trait>(
&'life0 self,
_config: Option<Arc<ModuleConfig>>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn cron(&self) -> Option<CronConfig> { ... }
}Required Methods§
fn name(&self) -> String
fn version(&self) -> i32
fn default_arc() -> Arc<dyn ModuleTrait> ⓘwhere
Self: Sized,
Provided Methods§
fn should_login(&self) -> bool
fn headers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Headers> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn dag_definition<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<ModuleDagDefinition>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn dag_definition<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<ModuleDagDefinition>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Optional custom DAG definition built from ModuleNodeTrait nodes.
Some(definition): use custom DAG path.None: fallback to legacyadd_steplinear-compat DAG.
fn add_step<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<Arc<dyn ModuleNodeTrait>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pre_process<'life0, 'async_trait>(
&'life0 self,
_config: Option<Arc<ModuleConfig>>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn post_process<'life0, 'async_trait>(
&'life0 self,
_config: Option<Arc<ModuleConfig>>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn cron(&self) -> Option<CronConfig>
fn cron(&self) -> Option<CronConfig>
Returns cron schedule config for this module.
Defaults to None (scheduled startup disabled).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".