pub struct MutableBooleanArray { /* private fields */ }
Expand description

The Arrow’s equivalent to Vec<Option<bool>>, but with 1/16 of its size. Converting a MutableBooleanArray into a BooleanArray is O(1).

Implementation

This struct does not allocate a validity until one is required (i.e. push a null to it).

Implementations§

Returns an iterator over the optional values of this MutableBooleanArray.

Returns an iterator over the values of this MutableBooleanArray

Creates an new empty MutableBooleanArray.

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

Errors

This function errors iff:

Creates an new MutableBooleanArray with a capacity of values.

Reserves additional slots.

Pushes a new entry to MutableBooleanArray.

Pop an entry from MutableBooleanArray. Note If the values is empty, this method will return None.

Extends the MutableBooleanArray from an iterator of values of trusted len. This differs from extend_trusted_len which accepts in iterator of optional values.

Extends the MutableBooleanArray from an iterator of values of trusted len. This differs from extend_trusted_len_unchecked, which accepts in iterator of optional values.

Safety

The iterator must be trusted len.

Extends the MutableBooleanArray from an iterator of trusted len.

Extends the MutableBooleanArray from an iterator of trusted len.

Safety

The iterator must be trusted len.

Converts itself into an Array.

Getters

Returns its values.

Setters

Sets position index to value. Note that if it is the first time a null appears in this array, this initializes the validity bitmap (O(N)).

Panic

Panics iff index is larger than self.len().

From implementations

Creates a new MutableBooleanArray from an TrustedLen of bool.

Creates a new MutableBooleanArray from an TrustedLen of bool. 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 new MutableBooleanArray 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.

Shrinks the capacity of the MutableBooleanArray to fit its current length.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Extends a collection with the contents of an iterator. Read more
🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Converts to this type from the input type.

Creates a new MutableBooleanArray 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
The length of the array.
The optional validity of the array.
Convert itself to an (immutable) Array.
Convert itself to an (immutable) atomically reference counted Array.
The DataType of the array.
Convert to Any, to enable dynamic casting.
Convert to mutable Any, to enable dynamic casting.
Adds a new null element to the array.
Reserves additional slots to its capacity.
Shrink the array to fit its length.
Whether the array is empty.
Whether index is valid / set. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

This is infalible and is implemented for consistency with all other types

Tries to extend itself with elements from other, failing only on overflow.

This is infalible and is implemented for consistency with all other types

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

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. 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.