Skip to main content

Module query

Module query 

Source
Expand description

Turn a Serialize struct into URL query pairs.

A minimal no_std serde serializer that flattens a flat struct of scalars, options and sequences into (key, value) string pairs ready for url’s query_pairs_mut().extend_pairs(...). Keys come from the struct field names (so a #[serde(rename_all = "camelCase")] params struct yields the Gmail query keys for free); None and empty sequences produce nothing, and a sequence produces one repeated-key pair per element.

Structs§

GmailQueryError
Error raised when a value cannot be flattened into query pairs.

Functions§

is_false
Predicate for #[serde(skip_serializing_if = ...)] on bool flags that should only appear in the query when set.
to_query_pairs
Serialize value into a list of URL query (key, value) pairs.