pub struct Facts { /* private fields */ }Expand description
Machine-readable facts attached to a QueryError.
Fact keys are static strings so they can be treated as a documented contract
by tests, reports, and callers. Values are stringified with ToString.
Iteration is sorted by key because facts are stored in a BTreeMap.
Decoration never panics: empty keys are ignored and duplicate inserts keep
the first value. Rejected keys are reported deterministically under
fact_collision_keys so a colliding decoration stays diagnosable without
replacing the primary error’s facts. Callers that own a key and must
overwrite it use QueryError::with_query_id, QueryError::with_trace_id,
or another explicit overwrite path, never a second QueryError::with_fact.
The native engine reserves cudf_code, cudf_kind, cudf_status,
cudf_operation, and cudf_message for wrapped cudf::Error facts.