Expand description
The composable-function contract — Rust port of the Java
LambdaFunction / TypedLambdaFunction<I, O>
(org.platformlambda.core.models).
ComposableFunction is the untyped registry currency (the LambdaFunction
analog): envelope in, envelope out. TypedFunction is the recommended
authoring surface (the TypedLambdaFunction<I, O> analog); wrap one in a
TypedAdapter to register it. AppError is the AppException analog —
HTTP-style status + message; a worker converts an Err into a response
envelope carrying that status.
Structs§
- AppError
- The
AppException(status, message)analog: HTTP-compatible status codes, where >= 400 is an error. - NoOp
Function - The convenient no-operation function for event scripts (Java
NoOpFunction, routeno.op): an echo — reply headers and body mirror the input. - Typed
Adapter - Bridges a
TypedFunctionto the untypedComposableFunctionregistry currency: deserializes the envelope body intoI, invokes the typed handler, and wrapsOback into a response envelope — unlessOIS anEventEnvelope, which is honoured as the reply itself (status, headers and body), the JavaTypedLambdaFunction<I, EventEnvelope>contract (WorkerHandler.updateResponse:result instanceof EventEnvelope).
Traits§
- Composable
Function - The untyped composable-function contract (the
LambdaFunctionanalog) — what thePlatformregistry stores. - Typed
Function - The typed authoring surface (the
TypedLambdaFunction<I, O>analog): implement this with concrete input/output types and register it viaTypedAdapter.