MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / parse_list

Function parse_list

src/repr/src/strconv.rs:1061–1072  ·  view source on GitHub ↗
(
    s: &'a str,
    is_element_type_list: bool,
    make_null: impl FnMut() -> T,
    gen_elem: impl FnMut(Cow<'a, str>) -> Result<T, E>,
)

Source from the content-addressed store, hash-verified

1059}
1060
1061pub 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>
1067where
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.

Callers 3

decode_textMethod · 0.50
decode_text_into_rowMethod · 0.50
evalMethod · 0.50

Calls 2

parse_list_innerFunction · 0.85
with_detailsMethod · 0.80

Tested by

no test coverage detected