pub trait ComposableFunction: Send + Sync {
// Required method
fn handle_event<'life0, 'async_trait>(
&'life0 self,
headers: HashMap<String, String>,
input: EventEnvelope,
instance: usize,
) -> Pin<Box<dyn Future<Output = Result<EventEnvelope, AppError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
The untyped composable-function contract (the LambdaFunction analog) —
what the Platform registry stores.
instance is the 1-based worker number (Java parity). Functions must stay
stateless and never call other user functions directly — coupling is
route-name + envelope only (inv-never-couple-functions).
Required Methods§
fn handle_event<'life0, 'async_trait>(
&'life0 self,
headers: HashMap<String, String>,
input: EventEnvelope,
instance: usize,
) -> Pin<Box<dyn Future<Output = Result<EventEnvelope, AppError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".