Expand description
The stable Rust authoring interface for Lenso Plugins and built-in Modules.
Harness feature authors use the Plugin-named facade. Built-in App authors may retain the Module-named compatibility facade. Adapter and Kernel implementation details remain behind generated glue.
Modules§
- prelude
- Common imports for native Rust Plugin and built-in Module authors.
Structs§
- Activate
Context - Context supplied while a Module initializes against prepared dependencies.
- Bound
Capability Client - One typed Capability client paired with its App-local provider Instance key.
- Cancellation
Token - Cooperative cancellation shared by one Module Instance generation.
- Ctx
- Kernel-owned context propagated across one native request invocation.
- Deactivate
Context - Context supplied while a Module releases one generation.
- Managed
Task Scope - A Module-generation task scope backed by the selected Runtime Driver.
- Managed
Tasks - A Module field connected to its generation-owned task scope during activation.
- Many
Port - A typed, lifecycle-bound
manyCapability requirement declared by a Module. - Port
- A typed, lifecycle-bound Capability requirement declared by a Module.
- Prepare
Context - Context supplied while a Module reserves reversible resources.
- Provider
Stream - One typed provider Stream erased to the native Adapter only after authoring.
- Provider
Stream Channel - The typed provider side of one bounded bidirectional Stream session.
Enums§
- Managed
Tasks Error - Failure returned when a Module cannot spawn generation-owned work.
- Module
Error - One Module operation failure with an explicit Domain/Runtime split.
- Runtime
Failure - Runtime-owned failure, kept separate from Capability-defined Domain Errors.
- Stream
Input - One typed value sent by a Capability consumer to a Stream provider.
- Typed
Extension Error - Failure to encode, decode, or attach a typed Invocation extension.
Traits§
- Capability
Client - A generated, strongly typed client for one required Capability.
- Capability
Client Many - A generated Capability client that can be connected to every explicitly bound provider in deterministic Resolved App Plan order.
- CtxExt
- Typed ordinary-extension helpers for
InvocationContext. - Lifecycle
- Optional convention-based lifecycle hooks for a struct-level Module.
- Typed
Extension - One application-owned typed projection over an ordinary Invocation extension.
Type Aliases§
- Module
Event Result - An asynchronous Event handler outcome observed by the Adapter after admission.
- Module
Future - The result type returned by prepare, activate, and deactivate hooks.
- Module
Result - A Module operation result that can explicitly preserve Domain and Runtime failures.
- Plugin
Error - Plugin-named operation failure preserving Domain and Runtime failures.
- Plugin
Event Result - A Plugin Event handler outcome observed by the Adapter after admission.
- Plugin
Result - A Plugin operation result preserving Domain and Runtime failures.
Attribute Macros§
- module
- Derives native Module source and, for
consumer, its factory registration. - plugin
- Derives native Plugin source through the same runtime lowering as [
module]. - provides
- Derives one or more provided Capability endpoints, one native factory, and static registration.
Derive Macros§
- Module
Config - Derives the locked JSON Schema fragment consumed by a struct-level Module.
- Plugin
Config - Derives Plugin configuration through the retained Module runtime schema.