pub enum VectorMut {
Null(NullVectorMut),
Bool(BoolVectorMut),
Decimal(DecimalVectorMut),
Primitive(PrimitiveVectorMut),
String(StringVectorMut),
Binary(BinaryVectorMut),
List(ListViewVectorMut),
FixedSizeList(FixedSizeListVectorMut),
Struct(StructVectorMut),
}Expand description
An enum over all kinds of mutable vectors, which represent fully decompressed (canonical) array data.
Most of the behavior of VectorMut is described by the VectorMutOps trait. Note that
vectors are always considered as nullable, and it is the responsibility of the user to not
add any nullable data to a vector they want to keep as non-nullable.
The immutable equivalent of this type is Vector, which implements the
VectorOps trait.
Variants§
Null(NullVectorMut)
Mutable Null vectors.
Bool(BoolVectorMut)
Mutable Boolean vectors.
Decimal(DecimalVectorMut)
Mutable Decimal vectors.
Note that DecimalVectorMut is an enum over the different possible (generic)
DVectorMut<D>s.
See the documentation for more information.
Primitive(PrimitiveVectorMut)
Mutable Primitive vectors.
Note that PrimitiveVectorMut is an enum over the different possible (generic)
PVectorMut<T>s.
See the documentation for more information.
String(StringVectorMut)
Mutable String vectors.
Binary(BinaryVectorMut)
Mutable Binary vectors.
List(ListViewVectorMut)
Mutable vectors of Lists with variable sizes.
FixedSizeList(FixedSizeListVectorMut)
Mutable vectors of Lists with fixed sizes.
Struct(StructVectorMut)
Mutable vectors of Struct elements.
Implementations§
Source§impl VectorMut
impl VectorMut
Sourcepub fn with_capacity(dtype: &DType, capacity: usize) -> Self
pub fn with_capacity(dtype: &DType, capacity: usize) -> Self
Create a new mutable vector with the given capacity and dtype.
Source§impl VectorMut
impl VectorMut
Sourcepub fn as_null_mut(&mut self) -> &mut NullVectorMut
pub fn as_null_mut(&mut self) -> &mut NullVectorMut
Returns a reference to the inner NullVectorMut if self is of that variant.
Sourcepub fn as_bool_mut(&mut self) -> &mut BoolVectorMut
pub fn as_bool_mut(&mut self) -> &mut BoolVectorMut
Returns a reference to the inner BoolVectorMut if self is of that variant.
Sourcepub fn as_primitive_mut(&mut self) -> &mut PrimitiveVectorMut
pub fn as_primitive_mut(&mut self) -> &mut PrimitiveVectorMut
Returns a reference to the inner PrimitiveVectorMut if self is of that variant.
Sourcepub fn as_string_mut(&mut self) -> &mut StringVectorMut
pub fn as_string_mut(&mut self) -> &mut StringVectorMut
Returns a reference to the inner StringVectorMut if self is of that variant.
Sourcepub fn as_binary_mut(&mut self) -> &mut BinaryVectorMut
pub fn as_binary_mut(&mut self) -> &mut BinaryVectorMut
Returns a reference to the inner BinaryVectorMut if self is of that variant.
Sourcepub fn as_list_mut(&mut self) -> &mut ListViewVectorMut
pub fn as_list_mut(&mut self) -> &mut ListViewVectorMut
Returns a reference to the inner ListViewVectorMut if self is of that variant.
Sourcepub fn as_fixed_size_list_mut(&mut self) -> &mut FixedSizeListVectorMut
pub fn as_fixed_size_list_mut(&mut self) -> &mut FixedSizeListVectorMut
Returns a reference to the inner FixedSizeListVectorMut if self is of that variant.
Sourcepub fn as_struct_mut(&mut self) -> &mut StructVectorMut
pub fn as_struct_mut(&mut self) -> &mut StructVectorMut
Returns a reference to the inner StructVectorMut if self is of that variant.
Sourcepub fn into_null(self) -> NullVectorMut
pub fn into_null(self) -> NullVectorMut
Consumes self and returns the inner NullVectorMut if self is of that variant.
Sourcepub fn into_bool(self) -> BoolVectorMut
pub fn into_bool(self) -> BoolVectorMut
Consumes self and returns the inner BoolVectorMut if self is of that variant.
Sourcepub fn into_primitive(self) -> PrimitiveVectorMut
pub fn into_primitive(self) -> PrimitiveVectorMut
Consumes self and returns the inner PrimitiveVectorMut if self is of that variant.
Sourcepub fn into_string(self) -> StringVectorMut
pub fn into_string(self) -> StringVectorMut
Consumes self and returns the inner StringVectorMut if self is of that variant.
Sourcepub fn into_binary(self) -> BinaryVectorMut
pub fn into_binary(self) -> BinaryVectorMut
Consumes self and returns the inner BinaryVectorMut if self is of that variant.
Sourcepub fn into_list(self) -> ListViewVectorMut
pub fn into_list(self) -> ListViewVectorMut
Consumes self and returns the inner ListViewVectorMut if self is of that variant.
Sourcepub fn into_fixed_size_list(self) -> FixedSizeListVectorMut
pub fn into_fixed_size_list(self) -> FixedSizeListVectorMut
Consumes self and returns the inner FixedSizeListVectorMut if self is of that
variant.
Sourcepub fn into_struct(self) -> StructVectorMut
pub fn into_struct(self) -> StructVectorMut
Consumes self and returns the inner StructVectorMut if self is of that variant.
Trait Implementations§
Source§impl BinaryViewDowncast for VectorMut
impl BinaryViewDowncast for VectorMut
Source§type Output<T: BinaryViewType> = BinaryViewVectorMut<T>
type Output<T: BinaryViewType> = BinaryViewVectorMut<T>
Source§fn into_binary(self) -> Self::Output<BinaryType>
fn into_binary(self) -> Self::Output<BinaryType>
Source§fn into_string(self) -> Self::Output<StringType>
fn into_string(self) -> Self::Output<StringType>
Source§impl BinaryViewTypeUpcast for VectorMut
impl BinaryViewTypeUpcast for VectorMut
Source§type Input<T: BinaryViewType> = BinaryViewVectorMut<T>
type Input<T: BinaryViewType> = BinaryViewVectorMut<T>
Source§fn from_binary(input: Self::Input<BinaryType>) -> Self
fn from_binary(input: Self::Input<BinaryType>) -> Self
Source§fn from_string(input: Self::Input<StringType>) -> Self
fn from_string(input: Self::Input<StringType>) -> Self
Source§impl<T: BinaryViewType> From<BinaryViewVectorMut<T>> for VectorMut
impl<T: BinaryViewType> From<BinaryViewVectorMut<T>> for VectorMut
Source§fn from(value: BinaryViewVectorMut<T>) -> Self
fn from(value: BinaryViewVectorMut<T>) -> Self
Source§impl From<BoolVectorMut> for VectorMut
impl From<BoolVectorMut> for VectorMut
Source§fn from(v: BoolVectorMut) -> Self
fn from(v: BoolVectorMut) -> Self
Source§impl<D: NativeDecimalType> From<DVectorMut<D>> for VectorMut
impl<D: NativeDecimalType> From<DVectorMut<D>> for VectorMut
Source§fn from(val: DVectorMut<D>) -> Self
fn from(val: DVectorMut<D>) -> Self
Source§impl From<DecimalVectorMut> for VectorMut
impl From<DecimalVectorMut> for VectorMut
Source§fn from(v: DecimalVectorMut) -> Self
fn from(v: DecimalVectorMut) -> Self
Source§impl From<FixedSizeListVectorMut> for VectorMut
impl From<FixedSizeListVectorMut> for VectorMut
Source§fn from(v: FixedSizeListVectorMut) -> Self
fn from(v: FixedSizeListVectorMut) -> Self
Source§impl From<ListViewVectorMut> for VectorMut
impl From<ListViewVectorMut> for VectorMut
Source§fn from(v: ListViewVectorMut) -> Self
fn from(v: ListViewVectorMut) -> Self
Source§impl From<NullVectorMut> for VectorMut
impl From<NullVectorMut> for VectorMut
Source§fn from(v: NullVectorMut) -> Self
fn from(v: NullVectorMut) -> Self
Source§impl<T: NativePType> From<PVectorMut<T>> for VectorMut
impl<T: NativePType> From<PVectorMut<T>> for VectorMut
Source§fn from(val: PVectorMut<T>) -> Self
fn from(val: PVectorMut<T>) -> Self
Source§impl From<PrimitiveVectorMut> for VectorMut
impl From<PrimitiveVectorMut> for VectorMut
Source§fn from(v: PrimitiveVectorMut) -> Self
fn from(v: PrimitiveVectorMut) -> Self
Source§impl From<StructVectorMut> for VectorMut
impl From<StructVectorMut> for VectorMut
Source§fn from(v: StructVectorMut) -> Self
fn from(v: StructVectorMut) -> Self
Source§impl VectorMutOps for VectorMut
impl VectorMutOps for VectorMut
Source§fn len(&self) -> usize
fn len(&self) -> usize
Source§fn validity(&self) -> &MaskMut
fn validity(&self) -> &MaskMut
true represents a valid element and
false represents a null element. Read moreSource§fn capacity(&self) -> usize
fn capacity(&self) -> usize
Source§fn reserve(&mut self, additional: usize)
fn reserve(&mut self, additional: usize)
additional more elements to be inserted in the given
vector. Read moreSource§fn truncate(&mut self, len: usize)
fn truncate(&mut self, len: usize)
Source§fn extend_from_vector(&mut self, other: &Vector)
fn extend_from_vector(&mut self, other: &Vector)
Source§fn append_nulls(&mut self, n: usize)
fn append_nulls(&mut self, n: usize)
n null elements to the vector. Read moreSource§fn split_off(&mut self, at: usize) -> Self
fn split_off(&mut self, at: usize) -> Self
Auto Trait Implementations§
impl Freeze for VectorMut
impl RefUnwindSafe for VectorMut
impl Send for VectorMut
impl Sync for VectorMut
impl Unpin for VectorMut
impl UnwindSafe for VectorMut
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.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>
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>
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 moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.