Skip to main content

Module queryable

Module queryable 

Source
Expand description

Queryable — decoding a generic Value into a caller’s own type, and the helpers #[derive(Queryable)] generates calls to.

Conventional in role rather than in mechanism: a client that decodes straight off a binary wire format does so against a type descriptor, while Pylon has already walked the compiled shape into a Value by the time this runs, so this is a plain &Value -> Result<Self> conversion.

Fields match by name, not by shape position. A positional derive would compare the struct’s field order against the shape’s pointer order and reject a mismatch; a Pylon [Object] is name-keyed, so order is irrelevant here. The bug a positional check catches is still caught: a struct field the query never selected is a DecodeErrorKind::MissingField, not a silently-wrong value.

Structs§

DecodeError
What went wrong, and where in the result it was.

Enums§

DecodeErrorKind

Traits§

Queryable
A type a query result can be decoded into — implemented for the scalars Pylon returns, for Option/Vec of those, and derivable for a row struct or a schema enum with #[derive(Queryable)].