pub struct StructVectorMut { /* private fields */ }Expand description
A mutable vector of struct values (values with named fields).
Struct values are stored column-wise in the vector, so values in the same field are stored next to each other (rather than values in the same struct stored next to each other).
Implementations§
Source§impl StructVectorMut
impl StructVectorMut
Sourcepub fn new(fields: Box<[VectorMut]>, validity: MaskMut) -> Self
pub fn new(fields: Box<[VectorMut]>, validity: MaskMut) -> Self
Creates a new StructVectorMut with the given fields and validity mask.
§Panics
Panics if:
- Any field vector has a length that does not match the length of other fields.
- The validity mask length does not match the field length.
Sourcepub fn try_new(
fields: Box<[VectorMut]>,
validity: MaskMut,
) -> VortexResult<Self>
pub fn try_new( fields: Box<[VectorMut]>, validity: MaskMut, ) -> VortexResult<Self>
Tries to create a new StructVectorMut with the given fields and validity mask.
§Errors
Returns an error if:
- Any field vector has a length that does not match the length of other fields.
- The validity mask length does not match the field length.
Sourcepub unsafe fn new_unchecked(fields: Box<[VectorMut]>, validity: MaskMut) -> Self
pub unsafe fn new_unchecked(fields: Box<[VectorMut]>, validity: MaskMut) -> Self
Creates a new StructVectorMut with the given fields and validity mask without
validation.
§Safety
The caller must ensure that:
- All field vectors have the same length.
- The validity mask has a length equal to the field length.
Sourcepub fn with_capacity(struct_fields: &StructFields, capacity: usize) -> Self
pub fn with_capacity(struct_fields: &StructFields, capacity: usize) -> Self
Creates a new StructVectorMut with the given fields and capacity.
Sourcepub fn into_parts(self) -> (Box<[VectorMut]>, MaskMut, usize)
pub fn into_parts(self) -> (Box<[VectorMut]>, MaskMut, usize)
Decomposes the struct vector into its constituent parts (fields, validity, and length).
Sourcepub fn fields(&self) -> &[VectorMut]
pub fn fields(&self) -> &[VectorMut]
Returns the fields of the StructVectorMut, each stored column-wise as a VectorMut.
Sourcepub unsafe fn fields_mut(&mut self) -> &mut [VectorMut]
pub unsafe fn fields_mut(&mut self) -> &mut [VectorMut]
Returns a mutable handle to the field vectors.
§Safety
Callers must ensure that any modifications to the field vectors do not violate the invariants of this type, namely that all field vectors are of the same length and equal to the length of the validity.
Sourcepub unsafe fn validity_mut(&mut self) -> &mut MaskMut
pub unsafe fn validity_mut(&mut self) -> &mut MaskMut
Returns a mutable handle to the validity mask of the vector.
§Safety
Callers must ensure that if the length of the mask is modified, the lengths of all of the field vectors should be updated accordingly to continue meeting the invariants of the type.
Sourcepub fn minimum_capacity(&self) -> usize
pub fn minimum_capacity(&self) -> usize
Finds the minimum capacity of all field vectors.
This is equal to the maximum amount of scalars we can add before we need to reallocate at least one of the child field vectors.
If there are no fields, this returns the length of the vector.
Note that this takes time in O(f), where f is the number of fields.
Trait Implementations§
Source§impl Clone for StructVectorMut
impl Clone for StructVectorMut
Source§fn clone(&self) -> StructVectorMut
fn clone(&self) -> StructVectorMut
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StructVectorMut
impl Debug for StructVectorMut
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 StructVectorMut
impl VectorMutOps for StructVectorMut
Source§type Immutable = StructVector
type Immutable = StructVector
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: &StructVector)
fn extend_from_vector(&mut self, other: &StructVector)
Source§fn append_nulls(&mut self, n: usize)
fn append_nulls(&mut self, n: usize)
n null elements to the vector. Read moreSource§fn freeze(self) -> StructVector
fn freeze(self) -> StructVector
self into an immutable vector.Source§fn split_off(&mut self, at: usize) -> Self
fn split_off(&mut self, at: usize) -> Self
Auto Trait Implementations§
impl Freeze for StructVectorMut
impl RefUnwindSafe for StructVectorMut
impl Send for StructVectorMut
impl Sync for StructVectorMut
impl Unpin for StructVectorMut
impl UnwindSafe for StructVectorMut
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.