(
s: &'a str,
is_element_type_list: bool,
make_null: impl FnMut() -> T,
gen_elem: impl FnMut(Cow<'a, str>) -> Result<T, E>,
)
| 1059 | } |
| 1060 | |
| 1061 | pub fn parse_list<'a, T, E>( |
| 1062 | s: &'a str, |
| 1063 | is_element_type_list: bool, |
| 1064 | make_null: impl FnMut() -> T, |
| 1065 | gen_elem: impl FnMut(Cow<'a, str>) -> Result<T, E>, |
| 1066 | ) -> Result<Vec<T>, ParseError> |
| 1067 | where |
| 1068 | E: ToString, |
| 1069 | { |
| 1070 | parse_list_inner(s, is_element_type_list, make_null, gen_elem) |
| 1071 | .map_err(|details| ParseError::invalid_input_syntax("list", s).with_details(details)) |
| 1072 | } |
| 1073 | |
| 1074 | // `parse_list_inner`'s separation from `parse_list` simplifies error handling |
| 1075 | // by allowing subprocedures to return `String` errors. |
no test coverage detected