Struct structured::Column
source · 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>where
T: Array + 'static,
&'a T: IntoIterator,
pub fn iter<'a, T>(&'a self) -> Result<Flatten<IntoIter<&'a T>>, TypeError>where T: Array + 'static, &'a T: IntoIterator,
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
.