Expand description
Typed, forward-compatible status enums for results and query runs.
The generated models expose status as a bare String because the OpenAPI
spec types it as an open string. These hand-written enums give a typed,
ergonomic view without making the SDK brittle: each carries an
Other catch-all so an unrecognized status (e.g. a
value the server adds in a future release) round-trips instead of failing to
parse. This mirrors runtimedb’s own lenient parsing (ResultStatus::parse /
QueryRunStatus::parse, which fall back rather than reject) — a generated,
closed enum would instead break deserialization on any new status.
This module is hand-written and regeneration-immune; it never edits the
generated models, only interprets their status strings.
use hotdata::{ResultStatus, ResultStatusExt};
use hotdata::models::GetResultResponse;
fn describe(resp: &GetResultResponse) -> bool {
matches!(resp.result_status(), ResultStatus::Ready)
}Enums§
- Query
RunStatus - Status of a query run (
GET /v1/query-runs/{id}). - Result
Status - Status of a persisted query result (
GET /v1/results/{id}).
Traits§
- Query
RunStatus Ext - Typed access to a response’s query-run
statusstring. - Result
Status Ext - Typed access to a response’s result
statusstring.