Skip to main content

opt_f64

Function opt_f64 

Source
pub fn opt_f64(args: &Value, name: &str) -> ArgResult<f64>
Expand description

Extract a floating-point argument ("type": "number").

Accepts a JSON number or a numeric string ("100000", "0.7"). Rejects non-finite results and anything unparseable.

§Errors

Returns the client-facing message when the value is present but not a number.