Function require_typed_arg

Source
pub fn require_typed_arg<'a, T>(
    func_or_form_name: &str,
    args: &'a [Value],
    index: usize,
) -> Result<T, RuntimeError>
where T: TryFrom<&'a Value> + TypeName,
Expand description

Given a Value assumed to be a Value::List(), and some type T, grab the item at index in the list and try converting it to type T. RuntimeError if the argument doesn’t exist, or if it is the wrong type.