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

A MutableArray that builds a BinaryArray. It differs from MutableBinaryArray in that it builds non-null BinaryArray.

Implementations§

Returns an empty MutableBinaryValuesArray.

Returns a MutableBinaryValuesArray created from its internal representation.

Errors

This function returns an error iff:

  • The last offset is not equal to the values’ length.
  • The data_type’s crate::datatypes::PhysicalType is not equal to either Binary or LargeBinary.
Implementation

This function is O(1)

Returns the default DataType of this container: DataType::Utf8 or DataType::LargeUtf8 depending on the generic Offset.

Initializes a new MutableBinaryValuesArray with a pre-allocated capacity of items.

Initializes a new MutableBinaryValuesArray with a pre-allocated capacity of items and values.

returns its values.

returns its offsets.

Reserves additional elements and additional_values on the values.

Returns the capacity in number of items

Returns the length of this array

Pushes a new item to the array.

Panic

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

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

Returns the value of the element at index i.

Panic

This function panics iff i >= self.len.

Returns the value of the element at index i.

Safety

This function is safe iff i < self.len.

Returns an iterator of &[u8]

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

Extract the low-end APIs from the MutableBinaryValuesArray.

Extends MutableBinaryValuesArray from an iterator of trusted len.

Safety

The iterator must be trusted len.

Returns a new MutableBinaryValuesArray from an iterator of trusted length.

Safety

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

Returns a new MutableBinaryValuesArray from an iterator.

Error

This operation errors iff the total length in bytes on the iterator exceeds O’s maximum value. (i32::MAX or i64::MAX respectively).

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.
Converts to this type from the input type.
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
Fallible version of Extend::extend.
Tries to extend itself with elements from other, failing only on overflow.
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 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.