pub trait RuntimeModule:
Module
+ CustomSourceRuntimeModule
+ AttachableRuntimeModule
+ NamedRuntimeModule {
// Required methods
fn runtime_module_variables() -> &'static [&'static str]
where Self: Sized;
fn generate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 RuntimeModuleGenerateContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided methods
fn stage(&self) -> RuntimeModuleStage { ... }
fn full_hash(&self) -> bool { ... }
fn dependent_hash(&self) -> bool { ... }
fn should_isolate(&self, runtime_mode: RuntimeMode) -> bool { ... }
fn template(&self) -> Vec<(String, String)> { ... }
fn generate_with_custom<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 RuntimeModuleGenerateContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn runtime_requirements(
&self,
_compilation: &Compilation,
) -> RuntimeModuleRuntimeRequirements { ... }
}Required Methods§
Sourcefn runtime_module_variables() -> &'static [&'static str]where
Self: Sized,
fn runtime_module_variables() -> &'static [&'static str]where
Self: Sized,
Names that this runtime module may declare in the surrounding chunk scope.
Runtime modules backed by EJS templates should derive these names from top-level var() and
fn() declarations. #[impl_runtime_module] registers the provider so the names can be
reserved before runtime module instances are created.
fn generate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 RuntimeModuleGenerateContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Provided Methods§
fn stage(&self) -> RuntimeModuleStage
fn full_hash(&self) -> bool
fn dependent_hash(&self) -> bool
fn should_isolate(&self, runtime_mode: RuntimeMode) -> bool
fn template(&self) -> Vec<(String, String)>
fn generate_with_custom<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 RuntimeModuleGenerateContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn runtime_requirements( &self, _compilation: &Compilation, ) -> RuntimeModuleRuntimeRequirements
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".