Skip to main content

Installation

API reference for the iii-helpers crate (Rust).

http

HTTP request/response types, auth config, and the http helper. Import

Types

HttpAuthConfig · HttpInvocationConfig · HttpMethod · HttpRequest · HttpResponse

HttpAuthConfig

Authentication configuration for HTTP-invoked functions.
  • Hmac: HMAC signature verification using a shared secret.
  • Bearer: Bearer token authentication.
  • ApiKey: API key sent via a custom header.

HttpInvocationConfig

Configuration for an HTTP-invoked function (Lambda, Cloudflare Workers, etc.).

HttpMethod

HTTP method accepted by HttpInvocationConfig.

HttpRequest

Buffered HTTP request received by a function handler.

HttpResponse

Buffered HTTP response returned from a function handler.

observability

Logger, OpenTelemetry config, and span helpers. Import

Types

BaggageSpanProcessor · ConnectionState · Logger · OtelConfig · ReconnectionConfig · WorkerGaugesOptions

BaggageSpanProcessor

OpenTelemetry span processor that copies OTel baggage entries onto each started span as attributes.

ConnectionState

Connection state for the shared WebSocket

Logger

Structured logger that sends logs to the engine as OpenTelemetry LogRecords. The engine prints them in its own output and stores them (engine::logs::list); they do not appear in the worker’s own output. Every log call automatically captures the active trace and span context, correlating your logs with distributed traces without any manual wiring. When OTel is not initialized (before the worker’s OpenTelemetry export starts, or with OTEL_ENABLED=false), Logger falls back to the tracing crate, which prints nothing unless the program installs a subscriber, for example tracing_subscriber::fmt().init(). Pass structured data as the second argument to any log method. Using a serde_json::Value object of key-value pairs (instead of string interpolation) lets you filter, aggregate, and build dashboards in your observability backend.

OtelConfig

Configuration for OpenTelemetry initialization

ReconnectionConfig

Configuration for WebSocket reconnection behavior

WorkerGaugesOptions

Options for registering worker gauges.

queue

Queue enqueue result types. Import

Types

EnqueueResult

EnqueueResult

Result returned when a function is called with CallAction::Enqueue.

stream

Stream change events, IO inputs, and update operations. Import

Types

MergePath · StreamDeleteResult · StreamSetResult · StreamUpdateResult · UpdateOp · UpdateOpError

MergePath

Path target for a UpdateOp::Merge operation. Accepts either a single string (legacy / first-level field) or an array of literal segments (nested path). Path normalization rules applied by the engine:
  • absent / Single("") / Segments(vec![]) → root merge
  • Single("foo") is equivalent to Segments(vec!["foo".into()])
  • Segments(["a", "b", "c"]) walks three literal keys, never interpreting dots specially. Segments(vec!["a.b".into()]) is a single literal key named "a.b".
Variant ordering is load-bearing. #[serde(untagged)] tries variants in declaration order, Single MUST come before Segments so a JSON string deserializes into Single rather than failing the array match first.

StreamDeleteResult

Result of a stream delete operation.

StreamSetResult

Result of a stream set operation.

StreamUpdateResult

Result of an atomic update operation

UpdateOp

Operations that can be performed atomically on a stream value

UpdateOpError

Per-op error reported by an atomic update operation.

worker_connection_manager

RBAC auth and registration callback types. Import

Types

AuthInput · AuthResult · OnFunctionRegistrationInput · OnFunctionRegistrationResult

AuthInput

Input passed to the RBAC auth function during WebSocket upgrade. Contains the HTTP headers, query parameters, and client IP from the connecting worker’s upgrade request.

AuthResult

Return value from the RBAC auth function. Controls which functions the authenticated worker can invoke and what context is forwarded to the middleware.

OnFunctionRegistrationInput

Input passed to the on_function_registration_function_id hook when a worker attempts to register a function through the RBAC port. Return an OnFunctionRegistrationResult with the (possibly mapped) fields, or return an error to deny the registration.

OnFunctionRegistrationResult

Result returned from the on_function_registration_function_id hook. Omitted fields keep the original value from the registration request.