pub struct MutableBinaryArray<O: Offset> { /* private fields */ }
Expand description

The Arrow’s equivalent to Vec<Option<Vec<u8>>>. Converting a MutableBinaryArray into a BinaryArray is O(1).

Implementation

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

Implementations

Creates a new empty MutableBinaryArray.

Implementation

This allocates a Vec of one element

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

Panics

This function panics iff:

  • The offsets and values are inconsistent
  • The validity is not None and its length is different from offsets’s length minus one.

Creates a new MutableBinaryArray with capacity for capacity values.

Implementation

This does not allocate the validity.

Initializes a new MutableBinaryArray with a pre-allocated capacity of slots and values.

Reserves additional slots.

Pushes a new element to the array.

Panic

This operation panics iff the length of all values (in bytes) exceeds O maximum value.

Pop the last entry from MutableBinaryArray. This function returns None iff this array is empty

Converts itself into an Array.

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

returns its values.

returns its offsets.

Creates a MutableBinaryArray from an iterator of trusted length.

Safety

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

Creates a MutableBinaryArray from an iterator of trusted length.

Creates a new BinaryArray from a TrustedLen of &[u8].

Safety

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

Creates a new BinaryArray from a TrustedLen of &[u8].

Creates a MutableBinaryArray 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 MutableBinaryArray from an falible iterator of trusted length.

Extends the MutableBinaryArray from an iterator of trusted length. This differs from extend_trusted_len which accepts iterator of optional values.

Extends the MutableBinaryArray from an iterator of values of trusted length. This differs from extend_trusted_len_unchecked which accepts iterator of optional values.

Safety

The iterator must be TrustedLen

Extends the MutableBinaryArray from an iterator of TrustedLen

Extends the MutableBinaryArray from an iterator of TrustedLen

Safety

The iterator must be TrustedLen

Creates a new MutableBinaryArray from a Iterator of &[u8].

Trait Implementations

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 value from an iterator. 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

Fallible version of Extend::extend.

Tries to push a new element.

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 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.