Function ensure_keyword_exists
Source fn ensure_keyword_exists(
keyword: &Keyword,
map: &mut HashMap<Keyword, Value>,
) -> Result<Value, BridgeError>
Expand description
Ensures a Keyword
exists in a HashMap
, removes it and returns it.
This is a helper function to ensure expected values are set while throwing context-rich
errors if they don’t.
§Errors
Returns an error if keyword
is not a key in map
.