MCPcopy Create free account
hub / github.com/apache/arrow-rs / write_list

Function write_list

arrow-cast/src/display.rs:1202–1216  ·  view source on GitHub ↗
(
    f: &mut dyn Write,
    mut range: Range<usize>,
    values: &ArrayFormatter<'_>,
)

Source from the content-addressed store, hash-verified

1200}
1201
1202fn write_list(
1203 f: &mut dyn Write,
1204 mut range: Range<usize>,
1205 values: &ArrayFormatter<'_>,
1206) -> FormatResult {
1207 f.write_char('[')?;
1208 if let Some(idx) = range.next() {
1209 write!(f, "{}", values.value(idx))?;
1210 }
1211 for idx in range {
1212 write!(f, ", {}", values.value(idx))?;
1213 }
1214 f.write_char(']')?;
1215 Ok(())
1216}
1217
1218impl<'a, O: OffsetSizeTrait> DisplayIndexState<'a> for &'a GenericListArray<O> {
1219 type State = ArrayFormatter<'a>;

Callers 2

writeMethod · 0.85
writeMethod · 0.85

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected