pub trait ElementRuntime:
Send
+ Sync
+ 'static {
// Required methods
fn materialize<'life0, 'life1, 'async_trait>(
&'life0 self,
resolved: &'life1 ResolvedConfiguration,
) -> Pin<Box<dyn Future<Output = Result<MaterializationOutputs>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn dematerialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn status_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = LiveStatusSummary> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn observe_state(
&self,
listener: StateTransitionListener,
) -> Box<dyn StateObservation>;
// Provided methods
fn on_trial_starting<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 TrialContext,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn on_trial_ending<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 TrialContext,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
The async behavioural surface of an element.
Implementations live in the hyperplane tier (one per element type).
Paramodel ships a mock implementation in paramodel-mock for TCK
tests.
Required Methods§
Sourcefn materialize<'life0, 'life1, 'async_trait>(
&'life0 self,
resolved: &'life1 ResolvedConfiguration,
) -> Pin<Box<dyn Future<Output = Result<MaterializationOutputs>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn materialize<'life0, 'life1, 'async_trait>(
&'life0 self,
resolved: &'life1 ResolvedConfiguration,
) -> Pin<Box<dyn Future<Output = Result<MaterializationOutputs>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Provision the element’s concrete resources.
resolved carries fully interpolated configuration. Returns
typed values keyed by result_parameters names.
Sourcefn dematerialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn dematerialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Release the element’s provisioned resources. Idempotent.
Sourcefn status_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = LiveStatusSummary> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn status_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = LiveStatusSummary> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Report the element’s current operational state.
Sourcefn observe_state(
&self,
listener: StateTransitionListener,
) -> Box<dyn StateObservation>
fn observe_state( &self, listener: StateTransitionListener, ) -> Box<dyn StateObservation>
Register a state-transition listener.
Implementations deliver a synthetic Unknown → current
transition immediately so the observer doesn’t miss the
current state.
Provided Methods§
Sourcefn on_trial_starting<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 TrialContext,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_trial_starting<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 TrialContext,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Trial is starting — hook for per-trial setup. Default no-op.
Sourcefn on_trial_ending<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 TrialContext,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_trial_ending<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 TrialContext,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Trial is ending — hook for per-trial teardown. Default no-op.