Skip to main content

decode_args

Function decode_args 

Source
pub fn decode_args<A: DeserializeOwned>(args: &Value) -> Result<A, Error>
Expand description

args as the arguments type A. Arguments are decoded as sent first, and those that decode so reach A exactly as sent. Others are decoded once more with each integral float in them as its integer, one bound for a serde_json::Value or f64 field too.

ยงErrors

When args does not fit A either way: the error of the second try when there was one, else of the arguments as sent.