pub struct FlatVector<'a> { /* private fields */ }Expand description
A flat (contiguous, scalar-row) vector borrowed from a
DataChunkHandle.
Implementations§
Source§impl<'a> FlatVector<'a>
impl<'a> FlatVector<'a>
Sourcepub fn row_is_null(&self, row: u64) -> bool
pub fn row_is_null(&self, row: u64) -> bool
Returns true if the row at the given index is null
§Panics
Panics if row is outside the vector capacity.
Sourcepub fn try_row_is_null(&self, row: u64) -> Result<bool>
pub fn try_row_is_null(&self, row: u64) -> Result<bool>
Returns whether the row is null, or an error if it is out of range.
Sourcepub unsafe fn as_mut_ptr<T>(&self) -> *mut T
pub unsafe fn as_mut_ptr<T>(&self) -> *mut T
Returns a mutable pointer to the vector’s backing data cast to T.
§Safety
The caller must ensure T matches the DuckDB vector’s physical storage.
Before dereferencing the pointer, the caller must also ensure the target
element is initialized, in bounds, and not accessed through another
incompatible or aliased reference.
Sourcepub unsafe fn as_slice<T>(&self) -> &[T]
pub unsafe fn as_slice<T>(&self) -> &[T]
Returns a typed slice of the vector.
§Safety
The caller must ensure T matches the DuckDB vector’s physical storage,
the backing allocation is sized for self.capacity() elements of T,
each returned element is initialized before it is read, and no &mut
references to the same storage exist for the returned lifetime.
Sourcepub unsafe fn as_slice_with_len<T>(&self, len: usize) -> &[T]
pub unsafe fn as_slice_with_len<T>(&self, len: usize) -> &[T]
Returns a typed slice of the vector up to a certain length.
§Safety
The caller must ensure T matches the DuckDB vector’s physical storage,
the backing allocation is sized for at least len elements of T, each
returned element is initialized before it is read, and no &mut
references to the same storage exist for the returned lifetime.
Sourcepub unsafe fn as_mut_slice<T>(&mut self) -> &mut [T]
pub unsafe fn as_mut_slice<T>(&mut self) -> &mut [T]
Returns a typed mutable slice of the vector.
§Safety
The caller must ensure T matches the DuckDB vector’s physical storage,
the backing allocation is sized for self.capacity() elements of T,
and no other references to the same storage exist for the returned
lifetime.
Sourcepub unsafe fn as_mut_slice_with_len<T>(&mut self, len: usize) -> &mut [T]
pub unsafe fn as_mut_slice_with_len<T>(&mut self, len: usize) -> &mut [T]
Returns a typed mutable slice of the vector up to a certain length.
§Safety
The caller must ensure T matches the DuckDB vector’s physical storage,
the backing allocation is sized for at least len elements of T, and
no other references to the same storage exist for the returned lifetime.
Sourcepub fn logical_type(&self) -> LogicalTypeHandle
pub fn logical_type(&self) -> LogicalTypeHandle
Returns the logical type of the vector