Struct polars_arrow::array::growable::GrowableDictionary
source · pub struct GrowableDictionary<'a, K: DictionaryKey> { /* private fields */ }
Expand description
Concrete Growable
for the DictionaryArray
.
§Implementation
This growable does not perform collision checks and instead concatenates
the values of each DictionaryArray
one after the other.
Implementations§
source§impl<'a, T: DictionaryKey> GrowableDictionary<'a, T>
impl<'a, T: DictionaryKey> GrowableDictionary<'a, T>
sourcepub fn new(
arrays: &[&'a DictionaryArray<T>],
use_validity: bool,
capacity: usize,
) -> Self
pub fn new( arrays: &[&'a DictionaryArray<T>], use_validity: bool, capacity: usize, ) -> Self
Creates a new GrowableDictionary
bound to arrays
with a pre-allocated capacity
.
§Panics
If arrays
is empty.
Trait Implementations§
source§impl<'a, T: DictionaryKey> From<GrowableDictionary<'a, T>> for DictionaryArray<T>
impl<'a, T: DictionaryKey> From<GrowableDictionary<'a, T>> for DictionaryArray<T>
source§fn from(val: GrowableDictionary<'a, T>) -> Self
fn from(val: GrowableDictionary<'a, T>) -> Self
Converts to this type from the input type.
source§impl<'a, T: DictionaryKey> Growable<'a> for GrowableDictionary<'a, T>
impl<'a, T: DictionaryKey> Growable<'a> for GrowableDictionary<'a, T>
source§fn extend_validity(&mut self, additional: usize)
fn extend_validity(&mut self, additional: usize)
source§fn as_arc(&mut self) -> Arc<dyn Array>
fn as_arc(&mut self) -> Arc<dyn Array>
Converts this
Growable
to an Arc<dyn Array>
, thereby finishing the mutation.
Self will be empty after such operation.Auto Trait Implementations§
impl<'a, K> Freeze for GrowableDictionary<'a, K>
impl<'a, K> !RefUnwindSafe for GrowableDictionary<'a, K>
impl<'a, K> Send for GrowableDictionary<'a, K>
impl<'a, K> Sync for GrowableDictionary<'a, K>
impl<'a, K> Unpin for GrowableDictionary<'a, K>where
K: Unpin,
impl<'a, K> !UnwindSafe for GrowableDictionary<'a, K>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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