XS_RunState (run state)
| Value | Name | Meaning |
|---|---|---|
| 0 | XS_RUN_STARTING | assembling |
| 1 | XS_RUN_RUNNING | serving |
| 2 | XS_RUN_RELOAD_FAILED | the last reload failed; the old generation keeps serving |
| 3 | XS_RUN_STOPPING | draining |
| 4 | XS_RUN_STOPPED | stopped |
Exposed on XS_ServerInfo.State and XS_HostInfo.State; reading it for inspection displays is safe (reading an enum value has no borrow lifetime).
XS_ReloadState (the seven reload states)
ACCEPTED ──▶ PREPARING ──▶ SUCCEEDED
(accepted) (compiling) (success)
├──▶ FAILED compile/validation failed; the old generation serves unchanged
├──▶ SUPERSEDED overwritten by a newer intent on the same server
└──▶ CANCELLED cancelled before submission
| Value | Name | Meaning |
|---|---|---|
| 0 | XS_RELOAD_UNKNOWN | initial / not found by query |
| 1 | XS_RELOAD_ACCEPTED | intent accepted (a stable ID was returned) |
| 2 | XS_RELOAD_PREPARING | snapshotting and compiling the candidate |
| 3 | XS_RELOAD_SUCCEEDED | the new generation is published |
| 4 | XS_RELOAD_FAILED | failed; Message carries the reason |
| 5 | XS_RELOAD_SUPERSEDED | overwritten by the latest intent (latest-wins) |
| 6 | XS_RELOAD_CANCELLED | cancelled before entering the side-effect zone |
XS_RequestResult (the three-way request result)
| Value | Name | Semantics |
|---|---|---|
| 0 | XS_OK | the full response has been written; the driver consumes the remaining body bytes and continues keep-alive |
| 1 | XS_FALLBACK | unhandled: GET/HEAD falls through to the static layer, everything else gets 404 |
| 2 | XS_TAKEOVER | the application takes over the connection: pull/Future do their own sending and receiving and finally Close |
XHTTP_METHOD_* (HTTP method bitmasks)
Common methods use non-overlapping single bits; a non-zero value is both a parsed single method and an atomic bit within a method set. The combination macros provide common route sets.
| Value | Name | Notes |
|---|---|---|
| 0x00000000 | XHTTP_METHOD_INVALID | empty or invalid token; within a set it naturally matches no method |
| 0x00000001 | XHTTP_METHOD_OTHER | a syntactically valid method without a built-in class (extension method) |
| 0x00000002 | XHTTP_METHOD_GET | GET |
| 0x00000004 | XHTTP_METHOD_HEAD | HEAD |
| 0x00000008 | XHTTP_METHOD_POST | POST |
| 0x00000010 | XHTTP_METHOD_PUT | PUT |
| 0x00000020 | XHTTP_METHOD_DELETE | DELETE |
| 0x00000040 | XHTTP_METHOD_CONNECT | CONNECT |
| 0x00000080 | XHTTP_METHOD_OPTIONS | OPTIONS |
| 0x00000100 | XHTTP_METHOD_TRACE | TRACE |
| 0x00000200 | XHTTP_METHOD_PATCH | PATCH |
Combination macros
/* the method set of common CRUD routes; PUT and PATCH both count as update methods */
#define XHTTP_METHOD_CRUD ( GET | POST | PUT | PATCH | DELETE )
/* matches any built-in method or a syntactically valid extension method */
#define XHTTP_METHOD_ANY ( OTHER | GET | HEAD | POST | PUT | DELETE
| CONNECT | OPTIONS | TRACE | PATCH )
Note that
CRUD does not include HEAD (HEAD reads metadata only, semantically like GET); ANY includes OTHER — it covers extension methods. When a route registers GET only, a HEAD request is rejected at the method slot (405 + Allow: GET) — behavior verified experimentally in chapter 2.