Take

Trait Take 

Source
pub trait Take<Indices: ?Sized> {
    type Output;

    // Required method
    fn take(self, indices: &Indices) -> Self::Output;
}
Expand description

Function for taking based on indices (which can have different representations).

Required Associated Types§

Source

type Output

The result type after performing the operation.

Required Methods§

Source

fn take(self, indices: &Indices) -> Self::Output

Creates a new object using the elements from the input indexed by indices.

For example, if we have an array [1, 2, 3, 4, 5] and indices [4, 2], the resulting array would be [5, 3].

The output should have the same length as the indices.

§Panics

This should panic if an index in indices is out-of-bounds with respect to self.

Implementations on Foreign Types§

Source§

impl Take<PrimitiveVector> for Vector

Source§

impl<D: NativeDecimalType, I: UnsignedPType> Take<[I]> for &DVector<D>

Source§

type Output = DVector<D>

Source§

fn take(self, indices: &[I]) -> DVector<D>

Source§

impl<D: NativeDecimalType, I: UnsignedPType> Take<PVector<I>> for &DVector<D>

Source§

type Output = DVector<D>

Source§

fn take(self, indices: &PVector<I>) -> DVector<D>

Source§

impl<I: UnsignedPType> Take<[I]> for &Mask

Source§

type Output = Mask

Source§

fn take(self, indices: &[I]) -> Mask

Source§

impl<I: UnsignedPType> Take<[I]> for &DecimalVector

Source§

impl<I: UnsignedPType> Take<[I]> for &PrimitiveVector

Source§

impl<I: UnsignedPType> Take<[I]> for &Vector

Source§

type Output = Vector

Source§

fn take(self, indices: &[I]) -> Vector

Source§

impl<I: UnsignedPType> Take<[I]> for &BitBuffer

Source§

type Output = BitBuffer

Source§

fn take(self, indices: &[I]) -> BitBuffer

Source§

impl<I: UnsignedPType> Take<[I]> for &BoolVector

Source§

type Output = BoolVector

Source§

fn take(self, indices: &[I]) -> BoolVector

Source§

impl<I: UnsignedPType> Take<[I]> for &FixedSizeListVector

Source§

impl<I: UnsignedPType> Take<[I]> for &ListViewVector

Source§

impl<I: UnsignedPType> Take<[I]> for &NullVector

Source§

type Output = NullVector

Source§

fn take(self, indices: &[I]) -> NullVector

Source§

impl<I: UnsignedPType> Take<[I]> for &StructVector

Source§

impl<I: UnsignedPType> Take<[I]> for Vector

Source§

type Output = Vector

Source§

fn take(self, indices: &[I]) -> Vector

Source§

impl<I: UnsignedPType> Take<PVector<I>> for &Mask

Source§

fn take(self, indices: &PVector<I>) -> Mask

Implementation of take on Mask that is null-aware.

If an index is specified as null by the PVector, then the taken mask value is set to false.

This is useful for many of the take implementations for vectors.

Source§

type Output = Mask

Source§

impl<I: UnsignedPType> Take<PVector<I>> for &DecimalVector

Source§

impl<I: UnsignedPType> Take<PVector<I>> for &PrimitiveVector

Source§

impl<I: UnsignedPType> Take<PVector<I>> for &Vector

Source§

type Output = Vector

Source§

fn take(self, indices: &PVector<I>) -> Vector

Source§

impl<I: UnsignedPType> Take<PVector<I>> for &BoolVector

Source§

type Output = BoolVector

Source§

fn take(self, indices: &PVector<I>) -> BoolVector

Source§

impl<I: UnsignedPType> Take<PVector<I>> for &FixedSizeListVector

Source§

impl<I: UnsignedPType> Take<PVector<I>> for &ListViewVector

Source§

impl<I: UnsignedPType> Take<PVector<I>> for &NullVector

Source§

type Output = NullVector

Source§

fn take(self, indices: &PVector<I>) -> NullVector

Source§

impl<I: UnsignedPType> Take<PVector<I>> for &StructVector

Source§

impl<I: UnsignedPType> Take<PVector<I>> for Vector

Source§

type Output = Vector

Source§

fn take(self, indices: &PVector<I>) -> Vector

Source§

impl<T> Take<PrimitiveVector> for &T
where for<'a, 'a, 'a, 'a> &'a T: Take<PVector<u8>, Output = T> + Take<PVector<u16>, Output = T> + Take<PVector<u32>, Output = T> + Take<PVector<u64>, Output = T>,

Source§

type Output = T

Source§

fn take(self, indices: &PrimitiveVector) -> T

Source§

impl<T: Copy, I: UnsignedPType> Take<[I]> for &[T]

Specialized implementation for non-nullable indices.

Source§

type Output = Buffer<T>

Source§

fn take(self, indices: &[I]) -> Buffer<T>

Source§

impl<T: Copy, I: UnsignedPType> Take<[I]> for &Buffer<T>

Source§

type Output = Buffer<T>

Source§

fn take(self, indices: &[I]) -> Buffer<T>

Source§

impl<T: NativePType, I: UnsignedPType> Take<[I]> for &PVector<T>

Source§

type Output = PVector<T>

Source§

fn take(self, indices: &[I]) -> PVector<T>

Source§

impl<T: NativePType, I: UnsignedPType> Take<PVector<I>> for &PVector<T>

Source§

type Output = PVector<T>

Source§

fn take(self, indices: &PVector<I>) -> PVector<T>

Source§

impl<T: BinaryViewType, I: UnsignedPType> Take<[I]> for &BinaryViewVector<T>

Source§

impl<T: BinaryViewType, I: UnsignedPType> Take<PVector<I>> for &BinaryViewVector<T>

Implementors§