Skip to main content

Module Params

Module Params 

Source
Expand description

Positional and named scalar extractors for Parameters: Value arguments in CreateEffectForRequest domain handlers. Parameters is a single serde_json::Value that may be a JSON array (positional) or object (named). The str_obj_or_pos helper handles the 7 sites that accept both shapes.

Functions§

array_unwrap
Unwrap one level of outer array: [payload]payload, else identity. Handles callers that always wrap in an array vs those that send the value directly.
bool_at
bool_at_true
ensure_array
Ensure the value is a JSON array; wraps non-arrays in [value].
i64_at
i64_at_or
obj_bool
obj_f64
obj_str
obj_val
str_at
str_obj_or_pos
string_at
string_at_or
strip_file_uri
Strip a leading file:// or file:/// scheme. Handles the file://localhost/... form by removing the host segment.
u64_at
u64_at_or
uri_from_params
Extract a URI parameter that may arrive as [uri], {uri:…}, or bare.
val_at