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

Method from_iter

arrow-array/src/array/boolean_array.rs:768–777  ·  view source on GitHub ↗
(iter: I)

Source from the content-addressed store, hash-verified

766
767impl<Ptr: Into<BooleanAdapter>> FromIterator<Ptr> for BooleanArray {
768 fn from_iter<I: IntoIterator<Item = Ptr>>(iter: I) -> Self {
769 let iter = iter.into_iter();
770 let capacity = match iter.size_hint() {
771 (lower, Some(upper)) if lower == upper => lower,
772 _ => 0,
773 };
774 let mut builder = BooleanBuilder::with_capacity(capacity);
775 builder.extend(iter.map(|item| item.into().native));
776 builder.finish()
777 }
778}
779
780impl BooleanArray {

Callers

nothing calls this directly

Calls 4

into_iterMethod · 0.45
size_hintMethod · 0.45
extendMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected