4 enum groups · values checked against xsbase.h and xrt_decl.h

Enums Reference

Run states, the seven reload states, the three-way request result, and the HTTP method bitmask. The method mask is both the result of single-method parsing and the method set used for route registration.

XS_RunState (run state)

ValueNameMeaning
0XS_RUN_STARTINGassembling
1XS_RUN_RUNNINGserving
2XS_RUN_RELOAD_FAILEDthe last reload failed; the old generation keeps serving
3XS_RUN_STOPPINGdraining
4XS_RUN_STOPPEDstopped

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
ValueNameMeaning
0XS_RELOAD_UNKNOWNinitial / not found by query
1XS_RELOAD_ACCEPTEDintent accepted (a stable ID was returned)
2XS_RELOAD_PREPARINGsnapshotting and compiling the candidate
3XS_RELOAD_SUCCEEDEDthe new generation is published
4XS_RELOAD_FAILEDfailed; Message carries the reason
5XS_RELOAD_SUPERSEDEDoverwritten by the latest intent (latest-wins)
6XS_RELOAD_CANCELLEDcancelled before entering the side-effect zone

XS_RequestResult (the three-way request result)

ValueNameSemantics
0XS_OKthe full response has been written; the driver consumes the remaining body bytes and continues keep-alive
1XS_FALLBACKunhandled: GET/HEAD falls through to the static layer, everything else gets 404
2XS_TAKEOVERthe 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.

ValueNameNotes
0x00000000XHTTP_METHOD_INVALIDempty or invalid token; within a set it naturally matches no method
0x00000001XHTTP_METHOD_OTHERa syntactically valid method without a built-in class (extension method)
0x00000002XHTTP_METHOD_GETGET
0x00000004XHTTP_METHOD_HEADHEAD
0x00000008XHTTP_METHOD_POSTPOST
0x00000010XHTTP_METHOD_PUTPUT
0x00000020XHTTP_METHOD_DELETEDELETE
0x00000040XHTTP_METHOD_CONNECTCONNECT
0x00000080XHTTP_METHOD_OPTIONSOPTIONS
0x00000100XHTTP_METHOD_TRACETRACE
0x00000200XHTTP_METHOD_PATCHPATCH

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.