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

Function format_list

src/repr/src/strconv.rs:1670–1682  ·  view source on GitHub ↗
(
    buf: &mut F,
    elems: impl IntoIterator<Item = T>,
    format_elem: impl FnMut(ListElementWriter<F>, T) -> Result<Nestable, E>,
)

Source from the content-addressed store, hash-verified

1668}
1669
1670pub fn format_list<F, T, E>(
1671 buf: &mut F,
1672 elems: impl IntoIterator<Item = T>,
1673 format_elem: impl FnMut(ListElementWriter<F>, T) -> Result<Nestable, E>,
1674) -> Result<Nestable, E>
1675where
1676 F: FormatBuffer,
1677{
1678 buf.write_char('{');
1679 format_elems(buf, elems, format_elem, ',')?;
1680 buf.write_char('}');
1681 Ok(Nestable::Yes)
1682}
1683
1684/// Writes each `elem` into `buf`, separating the elems with `sep`.
1685pub fn format_elems<F, T, E>(

Callers 5

stringify_datumFunction · 0.85
encode_textMethod · 0.85
bench_format_list_simpleFunction · 0.85
bench_format_list_nestedFunction · 0.85
miri_test_format_listFunction · 0.85

Calls 2

format_elemsFunction · 0.85
write_charMethod · 0.80

Tested by 1

miri_test_format_listFunction · 0.68