pub struct Column { /* private fields */ }Expand description
A single column in a table.
Implementations§
Source§impl Column
impl Column
Sourcepub fn try_from_slice<T>(slice: &[T::Native]) -> Result<Self>where
T: ArrowPrimitiveType,
pub fn try_from_slice<T>(slice: &[T::Native]) -> Result<Self>where
T: ArrowPrimitiveType,
Sourcepub fn primitive_try_get<T>(
&self,
index: usize,
) -> Result<Option<T::Native>, TypeError>where
T: ArrowPrimitiveType,
pub fn primitive_try_get<T>(
&self,
index: usize,
) -> Result<Option<T::Native>, TypeError>where
T: ArrowPrimitiveType,
Return the value specified by the index as type T
§Errors
Returns an error if it’s fail to convert the value to the specified type
Sourcepub fn binary_try_get(&self, index: usize) -> Result<Option<&[u8]>, TypeError>
pub fn binary_try_get(&self, index: usize) -> Result<Option<&[u8]>, TypeError>
Return the value specified by the index as byte array
§Errors
Returns an error if it’s fail to convert the value to byte array
Sourcepub fn string_try_get(&self, index: usize) -> Result<Option<&str>, TypeError>
pub fn string_try_get(&self, index: usize) -> Result<Option<&str>, TypeError>
Return the value specified by the index as string
§Errors
Returns an error if it’s fail to convert the value to string
Sourcepub fn iter<'a, T>(&'a self) -> Result<Flatten<IntoIter<&'a T>>, TypeError>
pub fn iter<'a, T>(&'a self) -> Result<Flatten<IntoIter<&'a T>>, TypeError>
Creates an iterator iterating over all the cells in this Column.
§Errors
Returns an error if the type parameter does not match with the type of
this Column.
Sourcepub fn primitive_iter<'a, 'b, T>(
&'a self,
selected: &'b [usize],
) -> Result<PrimitiveIter<'a, 'b, T>, TypeError>where
T: ArrowPrimitiveType,
pub fn primitive_iter<'a, 'b, T>(
&'a self,
selected: &'b [usize],
) -> Result<PrimitiveIter<'a, 'b, T>, TypeError>where
T: ArrowPrimitiveType,
Creates an iterator iterating over a subset of the cells in this
Column of primitive type, designated by selected.
§Errors
Returns an error if the type parameter does not match with the type of
this Column.
Sourcepub fn binary_iter<'a, 'b>(
&'a self,
selected: &'b [usize],
) -> Result<BinaryIter<'a, 'b>, TypeError>
pub fn binary_iter<'a, 'b>( &'a self, selected: &'b [usize], ) -> Result<BinaryIter<'a, 'b>, TypeError>
Creates an iterator iterating over a subset of the cells in this
Column of binaries, designated by selected.
§Errors
Returns an error if the type parameter does not match with the type of
this Column.
Sourcepub fn string_iter<'a, 'b>(
&'a self,
selected: &'b [usize],
) -> Result<StringIter<'a, 'b>, TypeError>
pub fn string_iter<'a, 'b>( &'a self, selected: &'b [usize], ) -> Result<StringIter<'a, 'b>, TypeError>
Creates an iterator iterating over a subset of the cells in this
Column of strings, designated by selected.
§Errors
Returns an error if the type parameter does not match with the type of
this Column.