Skip to main content

Module function

Module function 

Source
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.
NoOpFunction
The convenient no-operation function for event scripts (Java NoOpFunction, route no.op): an echo — reply headers and body mirror the input.
TypedAdapter
Bridges a TypedFunction to the untyped ComposableFunction registry currency: deserializes the envelope body into I, invokes the typed handler, and wraps O back into a response envelope.

Traits§

ComposableFunction
The untyped composable-function contract (the LambdaFunction analog) — what the Platform registry stores.
TypedFunction
The typed authoring surface (the TypedLambdaFunction<I, O> analog): implement this with concrete input/output types and register it via TypedAdapter.