[][src]Trait pact_matching::models::json_utils::JsonToNum

pub trait JsonToNum<T> {
    fn json_to_number(map: &Map<String, Value>, field: &str, default: T) -> T;
}

Trait to convert a JSON structure to a number

Required methods

fn json_to_number(map: &Map<String, Value>, field: &str, default: T) -> T

Converts the JSON field in the map to a Number

Loading content...

Implementations on Foreign Types

impl JsonToNum<i32> for i32[src]

impl JsonToNum<u16> for u16[src]

Loading content...

Implementors

Loading content...