Struct arrow2::array::MutableDictionaryArray
source · pub struct MutableDictionaryArray<K: DictionaryKey, M: MutableArray> { /* private fields */ }
Expand description
A mutable, strong-typed version of DictionaryArray
.
§Example
Building a UTF8 dictionary with i32
keys.
let mut array: MutableDictionaryArray<i32, MutableUtf8Array<i32>> = MutableDictionaryArray::new();
array.try_push(Some("A"))?;
array.try_push(Some("B"))?;
array.push_null();
array.try_push(Some("C"))?;
Implementations§
source§impl<K: DictionaryKey, M: MutableArray + Default> MutableDictionaryArray<K, M>
impl<K: DictionaryKey, M: MutableArray + Default> MutableDictionaryArray<K, M>
sourcepub fn new() -> Self
pub fn new() -> Self
Creates an empty MutableDictionaryArray
.
source§impl<K: DictionaryKey, M: MutableArray> MutableDictionaryArray<K, M>
impl<K: DictionaryKey, M: MutableArray> MutableDictionaryArray<K, M>
sourcepub fn into_arc(self) -> Arc<dyn Array>
pub fn into_arc(self) -> Arc<dyn Array>
converts itself into Arc<dyn Array>
sourcepub fn into_box(self) -> Box<dyn Array>
pub fn into_box(self) -> Box<dyn Array>
converts itself into Box<dyn Array>
sourcepub fn shrink_to_fit(&mut self)
pub fn shrink_to_fit(&mut self)
Shrinks the capacity of the MutableDictionaryArray
to fit its current length.
sourcepub fn keys(&self) -> &MutablePrimitiveArray<K>
pub fn keys(&self) -> &MutablePrimitiveArray<K>
Returns the dictionary keys
Trait Implementations§
source§impl<K: Debug + DictionaryKey, M: Debug + MutableArray> Debug for MutableDictionaryArray<K, M>
impl<K: Debug + DictionaryKey, M: Debug + MutableArray> Debug for MutableDictionaryArray<K, M>
source§impl<K: DictionaryKey, M: MutableArray + Default> Default for MutableDictionaryArray<K, M>
impl<K: DictionaryKey, M: MutableArray + Default> Default for MutableDictionaryArray<K, M>
source§impl<K: DictionaryKey, M: MutableArray> From<M> for MutableDictionaryArray<K, M>
impl<K: DictionaryKey, M: MutableArray> From<M> for MutableDictionaryArray<K, M>
source§impl<K: DictionaryKey, M: MutableArray> From<MutableDictionaryArray<K, M>> for DictionaryArray<K>
impl<K: DictionaryKey, M: MutableArray> From<MutableDictionaryArray<K, M>> for DictionaryArray<K>
source§fn from(other: MutableDictionaryArray<K, M>) -> Self
fn from(other: MutableDictionaryArray<K, M>) -> Self
Converts to this type from the input type.
source§impl<K: DictionaryKey, M: 'static + MutableArray> MutableArray for MutableDictionaryArray<K, M>
impl<K: DictionaryKey, M: 'static + MutableArray> MutableArray for MutableDictionaryArray<K, M>
source§fn validity(&self) -> Option<&MutableBitmap>
fn validity(&self) -> Option<&MutableBitmap>
The optional validity of the array.
source§fn as_arc(&mut self) -> Arc<dyn Array>
fn as_arc(&mut self) -> Arc<dyn Array>
Convert itself to an (immutable) atomically reference counted
Array
.source§fn as_mut_any(&mut self) -> &mut dyn Any
fn as_mut_any(&mut self) -> &mut dyn Any
Convert to mutable
Any
, to enable dynamic casting.source§fn shrink_to_fit(&mut self)
fn shrink_to_fit(&mut self)
Shrink the array to fit its length.
source§impl<K, M, T: Hash> TryExtend<Option<T>> for MutableDictionaryArray<K, M>
impl<K, M, T: Hash> TryExtend<Option<T>> for MutableDictionaryArray<K, M>
source§fn try_extend<II: IntoIterator<Item = Option<T>>>(
&mut self,
iter: II
) -> Result<()>
fn try_extend<II: IntoIterator<Item = Option<T>>>( &mut self, iter: II ) -> Result<()>
Fallible version of
Extend::extend
.Auto Trait Implementations§
impl<K, M> Freeze for MutableDictionaryArray<K, M>where
M: Freeze,
impl<K, M> RefUnwindSafe for MutableDictionaryArray<K, M>where
M: RefUnwindSafe,
K: RefUnwindSafe,
impl<K, M> Send for MutableDictionaryArray<K, M>
impl<K, M> Sync for MutableDictionaryArray<K, M>
impl<K, M> Unpin for MutableDictionaryArray<K, M>
impl<K, M> UnwindSafe for MutableDictionaryArray<K, M>where
M: UnwindSafe,
K: UnwindSafe,
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