Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
GenericListViewBuilder in datafusion::common::arrow::array - Rust
[go: Go Back, main page]

Struct GenericListViewBuilder

Source
pub struct GenericListViewBuilder<OffsetSize, T>
where OffsetSize: OffsetSizeTrait, T: ArrayBuilder,
{ /* private fields */ }
Expand description

Implementations§

Source§

impl<OffsetSize, T> GenericListViewBuilder<OffsetSize, T>
where OffsetSize: OffsetSizeTrait, T: ArrayBuilder,

Source

pub fn new(values_builder: T) -> GenericListViewBuilder<OffsetSize, T>

Creates a new GenericListViewBuilder from a given values array builder

Source

pub fn with_capacity( values_builder: T, capacity: usize, ) -> GenericListViewBuilder<OffsetSize, T>

Creates a new GenericListViewBuilder from a given values array builder capacity is the number of items to pre-allocate space for in this builder

Source

pub fn with_field( self, field: impl Into<Arc<Field>>, ) -> GenericListViewBuilder<OffsetSize, T>

By default a nullable field is created with the name item

Note: Self::finish and Self::finish_cloned will panic if the field’s data type does not match that of T

Source§

impl<OffsetSize, T> GenericListViewBuilder<OffsetSize, T>
where OffsetSize: OffsetSizeTrait, T: ArrayBuilder + 'static,

Source

pub fn values(&mut self) -> &mut T

Returns the child array builder as a mutable reference.

This mutable reference can be used to append values into the child array builder, but you must call append to delimit each distinct list value.

Source

pub fn values_ref(&self) -> &T

Returns the child array builder as an immutable reference

Source

pub fn append(&mut self, is_valid: bool)

Finish the current variable-length list array slot

§Panics

Panics if the length of Self::values exceeds OffsetSize::MAX

Source

pub fn append_value<I, V>(&mut self, i: I)
where T: Extend<Option<V>>, I: IntoIterator<Item = Option<V>>,

Append value into this GenericListViewBuilder

Source

pub fn append_null(&mut self)

Append a null to this GenericListViewBuilder

See Self::append_value for an example use.

Source

pub fn append_option<I, V>(&mut self, i: Option<I>)
where T: Extend<Option<V>>, I: IntoIterator<Item = Option<V>>,

Appends an optional value into this GenericListViewBuilder

If Some calls Self::append_value otherwise calls Self::append_null

Source

pub fn finish(&mut self) -> GenericListViewArray<OffsetSize>

Builds the GenericListViewArray and reset this builder.

Source

pub fn finish_cloned(&self) -> GenericListViewArray<OffsetSize>

Builds the GenericListViewArray without resetting the builder.

Source

pub fn offsets_slice(&self) -> &[OffsetSize]

Returns the current offsets buffer as a slice

Trait Implementations§

Source§

impl<OffsetSize, T> ArrayBuilder for GenericListViewBuilder<OffsetSize, T>
where OffsetSize: OffsetSizeTrait, T: ArrayBuilder,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Returns the builder as a non-mutable Any reference.

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Returns the builder as a mutable Any reference.

Source§

fn into_box_any( self: Box<GenericListViewBuilder<OffsetSize, T>>, ) -> Box<dyn Any>

Returns the boxed builder as a box of Any.

Source§

fn len(&self) -> usize

Returns the number of array slots in the builder

Source§

fn finish(&mut self) -> Arc<dyn Array>

Builds the array and reset this builder.

Source§

fn finish_cloned(&self) -> Arc<dyn Array>

Builds the array without resetting the builder.

Source§

fn is_empty(&self) -> bool

Returns whether number of array slots is zero
Source§

impl<OffsetSize, T> Debug for GenericListViewBuilder<OffsetSize, T>
where OffsetSize: Debug + OffsetSizeTrait, T: Debug + ArrayBuilder,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<O, T> Default for GenericListViewBuilder<O, T>

Source§

fn default() -> GenericListViewBuilder<O, T>

Returns the “default value” for a type. Read more
Source§

impl<O, B, V, E> Extend<Option<V>> for GenericListViewBuilder<O, B>
where O: OffsetSizeTrait, B: ArrayBuilder + Extend<E>, V: IntoIterator<Item = E>,

Source§

fn extend<T>(&mut self, iter: T)
where T: IntoIterator<Item = Option<V>>,

Extends a collection with the contents of an iterator. Read more
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more

Auto Trait Implementations§

§

impl<OffsetSize, T> Freeze for GenericListViewBuilder<OffsetSize, T>
where T: Freeze, OffsetSize: Freeze,

§

impl<OffsetSize, T> RefUnwindSafe for GenericListViewBuilder<OffsetSize, T>
where T: RefUnwindSafe, OffsetSize: RefUnwindSafe,

§

impl<OffsetSize, T> Send for GenericListViewBuilder<OffsetSize, T>

§

impl<OffsetSize, T> Sync for GenericListViewBuilder<OffsetSize, T>

§

impl<OffsetSize, T> Unpin for GenericListViewBuilder<OffsetSize, T>
where T: Unpin, OffsetSize: Unpin,

§

impl<OffsetSize, T> UnwindSafe for GenericListViewBuilder<OffsetSize, T>
where T: UnwindSafe, OffsetSize: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T