Struct polars_arrow::array::MutableBinaryViewArray

source ·
pub struct MutableBinaryViewArray<T: ViewType + ?Sized> { /* private fields */ }

Implementations§

source§

impl<T: ViewType + ?Sized> MutableBinaryViewArray<T>

source

pub fn new() -> Self

source

pub fn with_capacity(capacity: usize) -> Self

source

pub fn views_mut(&mut self) -> &mut Vec<View>

source

pub fn views(&self) -> &[View]

source

pub fn completed_buffers(&self) -> &[Buffer<u8>]

source

pub fn validity(&mut self) -> Option<&mut MutableBitmap>

source

pub fn reserve(&mut self, additional: usize)

Reserves additional elements and additional_buffer on the buffer.

source

pub fn len(&self) -> usize

source

pub fn capacity(&self) -> usize

source

pub unsafe fn push_view(&mut self, v: View, buffers: &[Buffer<u8>])

§Safety
  • caller must allocate enough capacity
  • caller must ensure the view and buffers match.
source

pub fn push_value_ignore_validity<V: AsRef<T>>(&mut self, value: V)

source

pub fn push_value<V: AsRef<T>>(&mut self, value: V)

source

pub fn push<V: AsRef<T>>(&mut self, value: Option<V>)

source

pub fn push_null(&mut self)

source

pub fn extend_null(&mut self, additional: usize)

source

pub fn extend_constant<V: AsRef<T>>( &mut self, additional: usize, value: Option<V>, )

source

pub fn with_validity(self, validity: Option<MutableBitmap>) -> Self

Returns this array with a new validity.

§Panic

Panics iff validity.len() != self.len().

source

pub fn set_validity(&mut self, validity: Option<MutableBitmap>)

Sets the validity of this array.

§Panics

This function panics iff values.len() != self.len().

source

pub fn apply_validity<F: FnOnce(MutableBitmap) -> MutableBitmap>( &mut self, f: F, )

Applies a function f to the validity of this array.

This is an API to leverage clone-on-write

§Panics

This function panics if the function f modifies the length of the [Bitmap].

source

pub fn extend_values<I, P>(&mut self, iterator: I)
where I: Iterator<Item = P>, P: AsRef<T>,

source

pub fn extend_trusted_len_values<I, P>(&mut self, iterator: I)
where I: TrustedLen<Item = P>, P: AsRef<T>,

source

pub fn extend<I, P>(&mut self, iterator: I)
where I: Iterator<Item = Option<P>>, P: AsRef<T>,

source

pub fn extend_trusted_len<I, P>(&mut self, iterator: I)
where I: TrustedLen<Item = Option<P>>, P: AsRef<T>,

source

pub fn from_iterator<I, P>(iterator: I) -> Self
where I: Iterator<Item = Option<P>>, P: AsRef<T>,

source

pub fn from_values_iter<I, P>(iterator: I) -> Self
where I: Iterator<Item = P>, P: AsRef<T>,

source

pub fn from<S: AsRef<T>, P: AsRef<[Option<S>]>>(slice: P) -> Self

source

pub fn freeze(self) -> BinaryViewArrayGeneric<T>

source

pub fn value(&self, i: usize) -> &T

source

pub unsafe fn value_unchecked(&self, i: usize) -> &T

Returns the element at index i

§Safety

Assumes that the i < self.len.

source

pub unsafe fn value_from_view_unchecked<'a>(&'a self, view: &'a View) -> &'a T

Returns the element indicated by the given view.

§Safety

Assumes the View belongs to this MutableBinaryViewArray.

source

pub fn values_iter(&self) -> ArrayValuesIter<'_, MutableBinaryViewArray<T>>

Returns an iterator of &[u8] over every element of this array, ignoring the validity

source§

impl MutableBinaryViewArray<[u8]>

source

pub fn validate_utf8( &mut self, buffer_offset: usize, views_offset: usize, ) -> PolarsResult<()>

Trait Implementations§

source§

impl<'a, T: ViewType + ?Sized> ArrayAccessor<'a> for MutableBinaryViewArray<T>

§

type Item = &'a T

source§

unsafe fn value_unchecked(&'a self, index: usize) -> Self::Item

Safety Read more
source§

fn len(&self) -> usize

source§

impl<T: ViewType + ?Sized> Clone for MutableBinaryViewArray<T>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: ViewType + ?Sized> Debug for MutableBinaryViewArray<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: ViewType + ?Sized> Default for MutableBinaryViewArray<T>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<T: ViewType + ?Sized, P: AsRef<T>> Extend<Option<P>> for MutableBinaryViewArray<T>

source§

fn extend<I: IntoIterator<Item = Option<P>>>(&mut self, iter: I)

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl<T: ViewType + ?Sized> From<MutableBinaryViewArray<T>> for BinaryViewArrayGeneric<T>

source§

fn from(value: MutableBinaryViewArray<T>) -> Self

Converts to this type from the input type.
source§

impl<T: ViewType + ?Sized, P: AsRef<T>> FromIterator<Option<P>> for MutableBinaryViewArray<T>

source§

fn from_iter<I: IntoIterator<Item = Option<P>>>(iter: I) -> Self

Creates a value from an iterator. Read more
source§

impl<T: ViewType + ?Sized> MutableArray for MutableBinaryViewArray<T>

source§

fn data_type(&self) -> &ArrowDataType

The ArrowDataType of the array.
source§

fn len(&self) -> usize

The length of the array.
source§

fn validity(&self) -> Option<&MutableBitmap>

The optional validity of the array.
source§

fn as_box(&mut self) -> Box<dyn Array>

Convert itself to an (immutable) Array.
source§

fn as_any(&self) -> &dyn Any

Convert to Any, to enable dynamic casting.
source§

fn as_mut_any(&mut self) -> &mut dyn Any

Convert to mutable Any, to enable dynamic casting.
source§

fn push_null(&mut self)

Adds a new null element to the array.
source§

fn reserve(&mut self, additional: usize)

Reserves additional slots to its capacity.
source§

fn shrink_to_fit(&mut self)

Shrink the array to fit its length.
source§

fn is_empty(&self) -> bool

Whether the array is empty.
source§

fn as_arc(&mut self) -> Arc<dyn Array>

Convert itself to an (immutable) atomically reference counted Array.
source§

fn is_valid(&self, index: usize) -> bool

Whether index is valid / set. Read more
source§

impl<T, K> Pushable<Option<T>> for MutableBinaryViewArray<K>
where T: AsRef<K>, K: ViewType + ?Sized,

§

type Freeze = BinaryViewArrayGeneric<K>

source§

fn reserve(&mut self, additional: usize)

source§

fn push(&mut self, value: Option<T>)

source§

fn len(&self) -> usize

source§

fn push_null(&mut self)

source§

fn extend_constant(&mut self, additional: usize, value: Option<T>)

source§

fn extend_null_constant(&mut self, additional: usize)

source§

fn freeze(self) -> Self::Freeze

source§

fn with_capacity(capacity: usize) -> Self

source§

impl<T, K> Pushable<T> for MutableBinaryViewArray<K>
where T: AsRef<K> + NoOption, K: ViewType + ?Sized,

§

type Freeze = BinaryViewArrayGeneric<K>

source§

fn reserve(&mut self, additional: usize)

source§

fn push(&mut self, value: T)

source§

fn len(&self) -> usize

source§

fn push_null(&mut self)

source§

fn extend_constant(&mut self, additional: usize, value: T)

source§

fn extend_null_constant(&mut self, additional: usize)

source§

fn freeze(self) -> Self::Freeze

source§

fn with_capacity(capacity: usize) -> Self

source§

impl<T: ViewType + ?Sized, P: AsRef<T>> TryExtend<Option<P>> for MutableBinaryViewArray<T>

source§

fn try_extend<I: IntoIterator<Item = Option<P>>>( &mut self, iter: I, ) -> PolarsResult<()>

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

source§

impl<T: ViewType + ?Sized, P: AsRef<T>> TryPush<Option<P>> for MutableBinaryViewArray<T>

source§

fn try_push(&mut self, item: Option<P>) -> PolarsResult<()>

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

Auto Trait Implementations§

§

impl<T> Freeze for MutableBinaryViewArray<T>
where T: ?Sized,

§

impl<T> RefUnwindSafe for MutableBinaryViewArray<T>
where T: RefUnwindSafe + ?Sized,

§

impl<T> Send for MutableBinaryViewArray<T>
where T: ?Sized,

§

impl<T> Sync for MutableBinaryViewArray<T>
where T: ?Sized,

§

impl<T> Unpin for MutableBinaryViewArray<T>
where T: Unpin + ?Sized,

§

impl<T> UnwindSafe for MutableBinaryViewArray<T>
where T: UnwindSafe + ?Sized,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> DynClone for T
where T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<A, T, E> FromFallibleIterator<A, E> for T
where T: FromIterator<A>, E: Error,

source§

fn from_fallible_iter<F>(iter: F) -> Result<T, E>
where F: FallibleIterator<E, Item = A>,

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,