pub fn format_array_inner<F, T, E>(
    buf: &mut F,
    dims: &[ArrayDimension],
    elems: &mut impl Iterator<Item = T>,
    format_elem: &mut impl FnMut(ListElementWriter<'_, F>, T) -> Result<Nestable, E>
) -> Result<(), E> where
    F: FormatBuffer