Struct arrow2::array::MutablePrimitiveArray[][src]

pub struct MutablePrimitiveArray<T: NativeType> { /* fields omitted */ }
Expand description

The mutable version of PrimitiveArray. See MutableArray for more details.

Implementations

Creates a new empty MutablePrimitiveArray.

Creates a new MutablePrimitiveArray with a capacity.

Create a MutablePrimitiveArray out of low-end APIs.

Panics

This function panics iff:

  • data_type is not supported by the physical type
  • The validity is not None and its length is different from the values’s length

Extract the low-end APIs from the MutablePrimitiveArray.

Creates a new MutablePrimitiveArray from a capacity and DataType.

Reserves additional entries.

Adds a new value to the array.

Extends the MutablePrimitiveArray from an iterator of trusted len.

Extends the MutablePrimitiveArray from an iterator of trusted len.

Safety

The iterator must be trusted len.

Changes the arrays’ DataType, returning a new MutablePrimitiveArray. Use to change the logical type without changing the corresponding physical Type.

Implementation

This operation is O(1).

Converts itself into an Array.

Accessors

Returns its values.

Returns a mutable slice of 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().

Sets the validity.

Panic

Panics iff the validity’s len is not equal to the existing values’ length.

Sets values.

Panic

Panics iff the values’ length is not equal to the existing validity’s len.

Creates a MutablePrimitiveArray from a slice of values.

Creates a MutablePrimitiveArray from an iterator of trusted length.

Safety

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

Creates a MutablePrimitiveArray from an fallible iterator of trusted length.

Safety

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

Creates a MutablePrimitiveArray from an fallible iterator of trusted length.

Creates a new MutablePrimitiveArray out an iterator over values

Creates a new MutablePrimitiveArray from an iterator over values

Safety

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

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

Performs the conversion.

Performs the conversion.

Performs the conversion.

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.

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.

Whether the array is empty.

Whether index is valid / set. Read more

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

Performs the conversion.

Performs the conversion.

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.