Struct arrow::array::GenericBinaryArray
source · [−]pub struct GenericBinaryArray<OffsetSize: BinaryOffsetSizeTrait> { /* private fields */ }
Expand description
See BinaryArray
and LargeBinaryArray
for storing
binary data.
Implementations
sourceimpl<OffsetSize: BinaryOffsetSizeTrait> GenericBinaryArray<OffsetSize>
impl<OffsetSize: BinaryOffsetSizeTrait> GenericBinaryArray<OffsetSize>
sourcepub fn value_length(&self, i: usize) -> OffsetSize
pub fn value_length(&self, i: usize) -> OffsetSize
Returns the length for value at index i
.
sourcepub fn value_data(&self) -> Buffer
pub fn value_data(&self) -> Buffer
Returns a clone of the value data buffer
sourcepub fn value_offsets(&self) -> &[OffsetSize]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn value_offsets(&self) -> &[OffsetSize]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Returns the offset values in the offsets buffer
sourcepub unsafe fn value_unchecked(&self, i: usize) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub unsafe fn value_unchecked(&self, i: usize) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Returns the element at index i
as bytes slice
Safety
Caller is responsible for ensuring that the index is within the bounds of the array
sourcepub fn value(&self, i: usize) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn value(&self, i: usize) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Returns the element at index i
as bytes slice
sourcepub fn from_vec(v: Vec<&[u8]>) -> Self
pub fn from_vec(v: Vec<&[u8]>) -> Self
Creates a GenericBinaryArray from a vector of byte slices
See also Self::from_iter_values
sourcepub fn from_opt_vec(v: Vec<Option<&[u8]>>) -> Self
pub fn from_opt_vec(v: Vec<Option<&[u8]>>) -> Self
Creates a GenericBinaryArray from a vector of Optional (null) byte slices
sourcepub fn from_iter_values<Ptr, I>(iter: I) -> Self where
Ptr: AsRef<[u8]>,
I: IntoIterator<Item = Ptr>,
pub fn from_iter_values<Ptr, I>(iter: I) -> Self where
Ptr: AsRef<[u8]>,
I: IntoIterator<Item = Ptr>,
Creates a GenericBinaryArray
based on an iterator of values without nulls
sourcepub fn take_iter<'a>(
&'a self,
indexes: impl Iterator<Item = Option<usize>> + 'a
) -> impl Iterator<Item = Option<&[u8]>> + 'a
pub fn take_iter<'a>(
&'a self,
indexes: impl Iterator<Item = Option<usize>> + 'a
) -> impl Iterator<Item = Option<&[u8]>> + 'a
Returns an iterator that returns the values of array.value(i)
for an iterator with each element i
sourcepub unsafe fn take_iter_unchecked<'a>(
&'a self,
indexes: impl Iterator<Item = Option<usize>> + 'a
) -> impl Iterator<Item = Option<&[u8]>> + 'a
pub unsafe fn take_iter_unchecked<'a>(
&'a self,
indexes: impl Iterator<Item = Option<usize>> + 'a
) -> impl Iterator<Item = Option<&[u8]>> + 'a
Returns an iterator that returns the values of array.value(i)
for an iterator with each element i
Safety
caller must ensure that the indexes in the iterator are less than the array.len()
sourceimpl<'a, T: BinaryOffsetSizeTrait> GenericBinaryArray<T>
impl<'a, T: BinaryOffsetSizeTrait> GenericBinaryArray<T>
sourcepub fn iter(&'a self) -> GenericBinaryIter<'a, T>ⓘNotable traits for GenericBinaryIter<'a, T>impl<'a, T: BinaryOffsetSizeTrait> Iterator for GenericBinaryIter<'a, T> type Item = Option<&'a [u8]>;
pub fn iter(&'a self) -> GenericBinaryIter<'a, T>ⓘNotable traits for GenericBinaryIter<'a, T>impl<'a, T: BinaryOffsetSizeTrait> Iterator for GenericBinaryIter<'a, T> type Item = Option<&'a [u8]>;
constructs a new iterator
Trait Implementations
sourceimpl<OffsetSize: BinaryOffsetSizeTrait> Array for GenericBinaryArray<OffsetSize>
impl<OffsetSize: BinaryOffsetSizeTrait> Array for GenericBinaryArray<OffsetSize>
sourcefn data_ref(&self) -> &ArrayData
fn data_ref(&self) -> &ArrayData
Returns a reference-counted pointer to the underlying data of this array.
sourcefn slice(&self, offset: usize, length: usize) -> ArrayRef
fn slice(&self, offset: usize, length: usize) -> ArrayRef
Returns a zero-copy slice of this array with the indicated offset and length. Read more
sourcefn offset(&self) -> usize
fn offset(&self) -> usize
Returns the offset into the underlying data used by this array(-slice).
Note that the underlying data can be shared by many arrays.
This defaults to 0
. Read more
sourcefn is_null(&self, index: usize) -> bool
fn is_null(&self, index: usize) -> bool
Returns whether the element at index
is null.
When using this function on a slice, the index is relative to the slice. Read more
sourcefn is_valid(&self, index: usize) -> bool
fn is_valid(&self, index: usize) -> bool
Returns whether the element at index
is not null.
When using this function on a slice, the index is relative to the slice. Read more
sourcefn null_count(&self) -> usize
fn null_count(&self) -> usize
Returns the total number of null values in this array. Read more
sourcefn get_buffer_memory_size(&self) -> usize
fn get_buffer_memory_size(&self) -> usize
Returns the total number of bytes of memory pointed to by this array. The buffers store bytes in the Arrow memory format, and include the data as well as the validity map. Read more
sourcefn get_array_memory_size(&self) -> usize
fn get_array_memory_size(&self) -> usize
Returns the total number of bytes of memory occupied physically by this array.
This value will always be greater than returned by get_buffer_memory_size()
and
includes the overhead of the data structures that contain the pointers to the various buffers. Read more
sourcefn to_raw(&self) -> Result<(*const FFI_ArrowArray, *const FFI_ArrowSchema)>
fn to_raw(&self) -> Result<(*const FFI_ArrowArray, *const FFI_ArrowSchema)>
returns two pointers that represent this array in the C Data Interface (FFI)
sourceimpl<OffsetSize: BinaryOffsetSizeTrait> Debug for GenericBinaryArray<OffsetSize>
impl<OffsetSize: BinaryOffsetSizeTrait> Debug for GenericBinaryArray<OffsetSize>
sourceimpl<OffsetSize: BinaryOffsetSizeTrait> From<ArrayData> for GenericBinaryArray<OffsetSize>
impl<OffsetSize: BinaryOffsetSizeTrait> From<ArrayData> for GenericBinaryArray<OffsetSize>
sourceimpl<T: BinaryOffsetSizeTrait> From<GenericListArray<T>> for GenericBinaryArray<T>
impl<T: BinaryOffsetSizeTrait> From<GenericListArray<T>> for GenericBinaryArray<T>
sourcefn from(v: GenericListArray<T>) -> Self
fn from(v: GenericListArray<T>) -> Self
Converts to this type from the input type.
sourceimpl<OffsetSize: BinaryOffsetSizeTrait> From<Vec<&'_ [u8], Global>> for GenericBinaryArray<OffsetSize>
impl<OffsetSize: BinaryOffsetSizeTrait> From<Vec<&'_ [u8], Global>> for GenericBinaryArray<OffsetSize>
sourceimpl<OffsetSize: BinaryOffsetSizeTrait> From<Vec<Option<&'_ [u8]>, Global>> for GenericBinaryArray<OffsetSize>
impl<OffsetSize: BinaryOffsetSizeTrait> From<Vec<Option<&'_ [u8]>, Global>> for GenericBinaryArray<OffsetSize>
sourceimpl<Ptr, OffsetSize: BinaryOffsetSizeTrait> FromIterator<Option<Ptr>> for GenericBinaryArray<OffsetSize> where
Ptr: AsRef<[u8]>,
impl<Ptr, OffsetSize: BinaryOffsetSizeTrait> FromIterator<Option<Ptr>> for GenericBinaryArray<OffsetSize> where
Ptr: AsRef<[u8]>,
sourcefn from_iter<I: IntoIterator<Item = Option<Ptr>>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = Option<Ptr>>>(iter: I) -> Self
Creates a value from an iterator. Read more
sourceimpl<'a, T: BinaryOffsetSizeTrait> IntoIterator for &'a GenericBinaryArray<T>
impl<'a, T: BinaryOffsetSizeTrait> IntoIterator for &'a GenericBinaryArray<T>
sourceimpl<OffsetSize: BinaryOffsetSizeTrait> JsonEqual for GenericBinaryArray<OffsetSize>
impl<OffsetSize: BinaryOffsetSizeTrait> JsonEqual for GenericBinaryArray<OffsetSize>
sourceimpl<OffsetSize: BinaryOffsetSizeTrait> PartialEq<GenericBinaryArray<OffsetSize>> for GenericBinaryArray<OffsetSize>
impl<OffsetSize: BinaryOffsetSizeTrait> PartialEq<GenericBinaryArray<OffsetSize>> for GenericBinaryArray<OffsetSize>
sourceimpl<OffsetSize: BinaryOffsetSizeTrait> PartialEq<GenericBinaryArray<OffsetSize>> for Value
impl<OffsetSize: BinaryOffsetSizeTrait> PartialEq<GenericBinaryArray<OffsetSize>> for Value
Auto Trait Implementations
impl<OffsetSize> RefUnwindSafe for GenericBinaryArray<OffsetSize> where
OffsetSize: RefUnwindSafe,
impl<OffsetSize> Send for GenericBinaryArray<OffsetSize>
impl<OffsetSize> Sync for GenericBinaryArray<OffsetSize>
impl<OffsetSize> Unpin for GenericBinaryArray<OffsetSize>
impl<OffsetSize> UnwindSafe for GenericBinaryArray<OffsetSize> where
OffsetSize: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more