pub enum Vector {
Null(NullVector),
Bool(BoolVector),
Decimal(DecimalVector),
Primitive(PrimitiveVector),
String(StringVector),
Binary(BinaryVector),
List(ListViewVector),
FixedSizeList(FixedSizeListVector),
Struct(StructVector),
}Expand description
An enum over all kinds of immutable vectors, which represent fully decompressed (canonical) array data.
Most of the behavior of Vector is described by the VectorOps 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 mutable equivalent of this type is VectorMut, which implements the
VectorMutOps trait.
Variants§
Null(NullVector)
Null vectors.
Bool(BoolVector)
Boolean vectors.
Decimal(DecimalVector)
Decimal vectors.
Note that DecimalVector is an enum over the different possible (generic)
DVector<D>s.
See the documentation for more information.
Primitive(PrimitiveVector)
Primitive vectors.
Note that PrimitiveVector is an enum over the different possible (generic)
PVector<T>s.
See the documentation for more information.
String(StringVector)
String vectors
Binary(BinaryVector)
Binary vectors
List(ListViewVector)
Vectors of Lists with variable sizes.
FixedSizeList(FixedSizeListVector)
Vectors of Lists with fixed sizes.
Struct(StructVector)
Vectors of Struct elements.
Implementations§
Source§impl Vector
impl Vector
Sourcepub fn as_null(&self) -> &NullVector
pub fn as_null(&self) -> &NullVector
Returns a reference to the inner NullVector if self is of that variant.
Sourcepub fn as_bool(&self) -> &BoolVector
pub fn as_bool(&self) -> &BoolVector
Returns a reference to the inner BoolVector if self is of that variant.
Sourcepub fn as_primitive(&self) -> &PrimitiveVector
pub fn as_primitive(&self) -> &PrimitiveVector
Returns a reference to the inner PrimitiveVector if self is of that variant.
Sourcepub fn as_string(&self) -> &StringVector
pub fn as_string(&self) -> &StringVector
Returns a reference to the inner StringVector if self is of that variant.
Sourcepub fn as_binary(&self) -> &BinaryVector
pub fn as_binary(&self) -> &BinaryVector
Returns a reference to the inner BinaryVector if self is of that variant.
Sourcepub fn as_list(&self) -> &ListViewVector
pub fn as_list(&self) -> &ListViewVector
Returns a reference to the inner ListViewVector if self is of that variant.
Sourcepub fn as_fixed_size_list(&self) -> &FixedSizeListVector
pub fn as_fixed_size_list(&self) -> &FixedSizeListVector
Returns a reference to the inner FixedSizeListVector if self is of that variant.
Sourcepub fn as_struct(&self) -> &StructVector
pub fn as_struct(&self) -> &StructVector
Returns a reference to the inner StructVector if self is of that variant.
Sourcepub fn into_null(self) -> NullVector
pub fn into_null(self) -> NullVector
Consumes self and returns the inner NullVector if self is of that variant.
Sourcepub fn into_bool(self) -> BoolVector
pub fn into_bool(self) -> BoolVector
Consumes self and returns the inner BoolVector if self is of that variant.
Sourcepub fn into_primitive(self) -> PrimitiveVector
pub fn into_primitive(self) -> PrimitiveVector
Consumes self and returns the inner PrimitiveVector if self is of that variant.
Sourcepub fn into_decimal(self) -> DecimalVector
pub fn into_decimal(self) -> DecimalVector
Consumes self and returns the inner DecimalVector if self is of that variant.
Sourcepub fn into_string(self) -> StringVector
pub fn into_string(self) -> StringVector
Consumes self and returns the inner StringVector if self is of that variant.
Sourcepub fn into_binary(self) -> BinaryVector
pub fn into_binary(self) -> BinaryVector
Consumes self and returns the inner BinaryVector if self is of that variant.
Sourcepub fn into_list(self) -> ListViewVector
pub fn into_list(self) -> ListViewVector
Consumes self and returns the inner ListViewVector if self is of that variant.
Sourcepub fn into_fixed_size_list(self) -> FixedSizeListVector
pub fn into_fixed_size_list(self) -> FixedSizeListVector
Consumes self and returns the inner FixedSizeListVector if self is of that
variant.
Sourcepub fn into_struct(self) -> StructVector
pub fn into_struct(self) -> StructVector
Consumes self and returns the inner StructVector if self is of that variant.
Trait Implementations§
Source§impl BinaryViewDowncast for Vector
impl BinaryViewDowncast for Vector
Source§type Output<T: BinaryViewType> = BinaryViewVector<T>
type Output<T: BinaryViewType> = BinaryViewVector<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 Vector
impl BinaryViewTypeUpcast for Vector
Source§type Input<T: BinaryViewType> = BinaryViewVector<T>
type Input<T: BinaryViewType> = BinaryViewVector<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<BinaryViewVector<T>> for Vector
impl<T: BinaryViewType> From<BinaryViewVector<T>> for Vector
Source§fn from(value: BinaryViewVector<T>) -> Self
fn from(value: BinaryViewVector<T>) -> Self
Source§impl From<BoolVector> for Vector
impl From<BoolVector> for Vector
Source§fn from(v: BoolVector) -> Self
fn from(v: BoolVector) -> Self
Source§impl From<DecimalVector> for Vector
impl From<DecimalVector> for Vector
Source§fn from(v: DecimalVector) -> Self
fn from(v: DecimalVector) -> Self
Source§impl From<FixedSizeListVector> for Vector
impl From<FixedSizeListVector> for Vector
Source§fn from(v: FixedSizeListVector) -> Self
fn from(v: FixedSizeListVector) -> Self
Source§impl From<ListViewVector> for Vector
impl From<ListViewVector> for Vector
Source§fn from(v: ListViewVector) -> Self
fn from(v: ListViewVector) -> Self
Source§impl From<NullVector> for Vector
impl From<NullVector> for Vector
Source§fn from(v: NullVector) -> Self
fn from(v: NullVector) -> Self
Source§impl From<PrimitiveVector> for Vector
impl From<PrimitiveVector> for Vector
Source§fn from(v: PrimitiveVector) -> Self
fn from(v: PrimitiveVector) -> Self
Source§impl From<StructVector> for Vector
impl From<StructVector> for Vector
Source§fn from(v: StructVector) -> Self
fn from(v: StructVector) -> Self
Source§impl VectorOps for Vector
impl VectorOps for Vector
Source§fn len(&self) -> usize
fn len(&self) -> usize
Source§fn validity(&self) -> &Mask
fn validity(&self) -> &Mask
true represents a valid element and
false represents a null element. Read moreSource§fn slice(&self, range: impl RangeBounds<usize> + Clone + Debug) -> Self
fn slice(&self, range: impl RangeBounds<usize> + Clone + Debug) -> Self
start to end (exclusive).Source§fn try_into_mut(self) -> Result<VectorMut, Self>
fn try_into_mut(self) -> Result<VectorMut, Self>
Source§fn null_count(&self) -> usize
fn null_count(&self) -> usize
Auto Trait Implementations§
impl !Freeze for Vector
impl RefUnwindSafe for Vector
impl Send for Vector
impl Sync for Vector
impl Unpin for Vector
impl UnwindSafe for Vector
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.