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§
- Endpoint
Meta - Link-time endpoint registration metadata produced by proc macros.
- Handler
Key - Registration key for a type-erased handler stored by a server binding.
- Json
Error Envelope - Error envelope payload for JSON endpoint failures.
- Json
Error Response Envelope - Outer error response shape for surfaces that wrap errors under
error. - Json
Result Envelope - Success envelope for JSON endpoint responses:
{ "result": T }. - Param
Meta - Static parameter metadata used by
EndpointMeta. - SseFrame
- One Server-Sent Events frame:
event: <name>/data: <json>. - Type
RefStatic - Static type metadata used by proc macros in link-time endpoint registration.
- WsMessage
- One WebSocket JSON text-frame message:
{ "event": name, "data": payload }. - Zynk
Error - Runtime error type that can be converted into a JSON error envelope.
Enums§
- Endpoint
Kind - Supported endpoint surfaces. These map to Zynk’s stable wire routes.
- Static
Value - 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.