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

Method from_iter

arrow-array/src/array/run_array.rs:545–554  ·  view source on GitHub ↗
(iter: I)

Source from the content-addressed store, hash-verified

543/// ```
544impl<'a, T: RunEndIndexType> FromIterator<Option<&'a str>> for RunArray<T> {
545 fn from_iter<I: IntoIterator<Item = Option<&'a str>>>(iter: I) -> Self {
546 let it = iter.into_iter();
547 let (lower, _) = it.size_hint();
548 let mut builder = StringRunBuilder::with_capacity(lower, 256);
549 it.for_each(|i| {
550 builder.append_option(i);
551 });
552
553 builder.finish()
554 }
555}
556
557/// Constructs a `RunArray` from an iterator of strings.

Callers

nothing calls this directly

Calls 5

into_iterMethod · 0.45
size_hintMethod · 0.45
append_optionMethod · 0.45
finishMethod · 0.45
append_valueMethod · 0.45

Tested by

no test coverage detected