Skip to main content

Crate zynk_runtime

Crate zynk_runtime 

Source
Expand description

Pure wire-contract types for Zynk server runtimes.

This crate deliberately contains no HTTP framework integration. Server bindings such as Axum use these data structures to register endpoints, dispatch type-erased handlers, and preserve Zynk’s JSON/SSE/WebSocket wire shapes.

Re-exports§

pub use inventory;
pub use zynk_schema;

Structs§

EndpointMeta
Link-time endpoint registration metadata produced by proc macros.
HandlerKey
Registration key for a type-erased handler stored by a server binding.
JsonErrorEnvelope
Error envelope payload for JSON endpoint failures.
JsonErrorResponseEnvelope
Outer error response shape for surfaces that wrap errors under error.
JsonResultEnvelope
Success envelope for JSON endpoint responses: { "result": T }.
ParamMeta
Static parameter metadata used by EndpointMeta.
SseFrame
One Server-Sent Events frame: event: <name> / data: <json>.
TypeRefStatic
Static type metadata used by proc macros in link-time endpoint registration.
WsMessage
One WebSocket JSON text-frame message: { "event": name, "data": payload }.
ZynkError
Runtime error type that can be converted into a JSON error envelope.

Enums§

EndpointKind
Supported endpoint surfaces. These map to Zynk’s stable wire routes.
StaticValue
Static type metadata used by proc macros in link-time endpoint registration.

Constants§

CHANNEL_ERROR
Channel operation failed.
COMMAND_NOT_FOUND
Requested RPC/channel command was not registered.
ERROR_CODES
All Python-compatible error code spellings in canonical order.
EXECUTION_ERROR
Endpoint handler returned an execution error.
HANDLER_NOT_FOUND
Requested WebSocket message handler was not registered.
INTERNAL_ERROR
Unexpected internal runtime error.
STATIC_HANDLER_NOT_FOUND
Requested static file handler was not registered.
UPLOAD_HANDLER_NOT_FOUND
Requested upload handler was not registered.
UPLOAD_VALIDATION_ERROR
Upload request or file validation failed.
VALIDATION_ERROR
Request validation failed.
WEBSOCKET_ERROR
WebSocket operation failed.

Traits§

Handler
Type-erased endpoint handler contract used by server bindings.