server library

Adapter-neutral server runtime.

Classes

AppContext
Values and bindings created by an explicit list of application modules.
ContextKey<T extends Object>
A typed key for one value stored in an AppContext.
Headers
Case-insensitive, multi-value HTTP headers.
Module
One explicitly selected application capability.
ModuleBinding
A platform or capability integration contributed by a Module.
ModuleRegistry
Collects values and platform bindings while modules are registered.
NoServerInput
Input marker for a server function without arguments.
RenderContext
Data available to a route renderer.
RequestContext
Mutable request-scoped state shared by middleware and handlers.
RequestKey<T>
Type-safe identity used to extend one request context.
SerializationAdapter<T>
Extends RPC serialization with one tagged domain value.
Serializer
Versioned JSON-compatible serializer used by RPC and hydration handoff.
Server
Adapter-neutral runtime for typed routes and server functions.
ServerFunction<I, O>
One server-only RPC implementation.
ServerFunctionBinding
Generated manifest entry joining an implementation to its wire codecs.
ServerFunctionContext<I>
Request data available to a server-function handler.
ServerInvocation
Adapter-owned state scoped to one server request.
ServerLoadContext<P, S>
Typed input for one server route loader.
ServerRequest
Platform-neutral incoming request.
ServerResponse
Platform-neutral outgoing response with streaming body support.
ServerRoute<P, S, D>
Server behavior attached to a neutral route definition.
ServerRouteContext<P, S>
Typed input for one public HTTP route handler.

Enums

HttpMethod
HTTP methods understood by routes and server functions.

Extensions

AppRouteServer on AppRoute<P, S, D>
Attaches server behavior to a neutral route definition.

Typedefs

InvocationModuleFactory = Iterable<Module> Function(ServerInvocation invocation)
Creates request modules from adapter-owned invocation state.
Middleware = FutureOr<ServerResponse> Function(RequestContext context, Next next)
Intercepts a server request around the remaining handler chain.
Next = Future<ServerResponse> Function()
Continues to the next middleware or request handler.
Renderer = FutureOr<ServerResponse> Function(RenderContext context)
Renders one fully matched and loaded route branch.
ServerCloseHandler = FutureOr<void> Function()
Releases application-owned resources after server requests drain.
ServerErrorHandler = FutureOr<void> Function(ServerRequest request, Object error, StackTrace stackTrace)
Observes one unexpected server failure without changing its outcome.
ServerFunctionHandler<I, O> = FutureOr<O> Function(ServerFunctionContext<I> context)
Handles one server-function invocation.
ServerHandler = Future<ServerResponse> Function(ServerRequest request)
Handles one platform-neutral server request.
ServerInvocationErrorHandler = void Function(Object error, StackTrace stackTrace)
Observes an invocation failure that cannot be returned in the response.
ServerInvocationHandler = Future<ServerResponse> Function(ServerRequest request, ServerInvocation invocation)
Handles one request with adapter-owned invocation state.
ServerLoader<P, S, D> = FutureOr<D> Function(ServerLoadContext<P, S> context)
Loads data for a server route.
ServerRouteHandler<P, S> = FutureOr<ServerResponse> Function(ServerRouteContext<P, S> context)
Handles one HTTP method on a matched route.
ValueDecoder<T> = T Function(Object? value)
Converts one decoded wire value to T.
ValueEncoder<T> = Object? Function(T value)
Converts one typed value to a serializer-supported wire value.

Exceptions / Errors

HttpError
An explicit HTTP failure from application code.
NotFound
A not-found control-flow result understood by routes and RPC.
PayloadTooLargeException
Raised when a request payload exceeds its configured byte limit.
Redirect
A redirect control-flow result understood by routes and RPC.