Extract a bool from a `regorus::Value` object field.
(val: ®orus::Value, key: &str)
| 656 | |
| 657 | /// Extract a bool from a `regorus::Value` object field. |
| 658 | fn get_bool(val: ®orus::Value, key: &str) -> Option<bool> { |
| 659 | let key_val = regorus::Value::String(key.into()); |
| 660 | match val { |
| 661 | regorus::Value::Object(map) => match map.get(&key_val) { |
| 662 | Some(regorus::Value::Bool(b)) => Some(*b), |
| 663 | _ => None, |
| 664 | }, |
| 665 | _ => None, |
| 666 | } |
| 667 | } |
| 668 | |
| 669 | /// Extract a string array from a `regorus::Value` object field. |
| 670 | fn get_str_array(val: ®orus::Value, key: &str) -> Vec<String> { |
no test coverage detected