Struct arrow2::array::BooleanArray[][src]

pub struct BooleanArray { /* fields omitted */ }
Expand description

A BooleanArray is arrow’s equivalent to Vec<Option<bool>>, i.e. an array designed for highly performant operations on optionally nullable booleans. The size of this struct is O(1) as all data is stored behind an Arc.

Implementations

Creates a new BooleanArray from an TrustedLen of bool.

Creates a new BooleanArray from a slice of bool.

Creates a BooleanArray from an iterator of trusted length. Use this over BooleanArray::from_trusted_len_iter when the iterator is trusted len but this crate does not mark it as such.

Safety

The iterator must be TrustedLen. I.e. that size_hint().1 correctly reports its length.

Creates a BooleanArray from a TrustedLen.

Creates a BooleanArray from an falible iterator of trusted length.

Safety

The iterator must be TrustedLen. I.e. that size_hint().1 correctly reports its length.

Creates a BooleanArray from a TrustedLen.

constructs a new iterator

Returns an iterator of bool

Returns a new empty BooleanArray.

Returns a new BooleanArray whose all slots are null / None.

The canonical method to create a BooleanArray out of low-end APIs.

Panics

This function panics iff:

  • The validity is not None and its length is different from values’s length

Returns a slice of this BooleanArray.

Implementation

This operation is O(1) as it amounts to essentially increase two ref counts.

Panic

This function panics iff offset + length >= self.len().

Returns the element at index i as bool

Returns the element at index i as bool

Safety

Caller must be sure that i < self.len()

Returns the values bitmap of this BooleanArray.

Trait Implementations

The length of the Array. Every array has a length corresponding to the number of elements (slots). Read more

The DataType of the Array. In combination with Array::as_any, this can be used to downcast trait objects (dyn Array) to concrete arrays. Read more

The validity of the Array: every array has an optional Bitmap that, when available specifies whether the array slot is valid or not (null). When the validity is None, all slots are valid. Read more

Slices the Array, returning a new Box<dyn Array>. Read more

whether the array is empty

The number of null slots on this Array. This is usually used to branch implementations to cases where optimizations can be made. Read more

Returns whether slot i is null. Read more

Returns whether slot i is valid. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Creates a new BooleanArray out of a slice of Optional bool.

Creates a value from an iterator. Read more

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

The pointers to the buffers.

The offset

The children

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.