pub struct Table<'a, S: Scalar> { /* private fields */ }
Expand description
A table of data, with schema included. This is simply a map from Identifier
to Column
,
where columns order matters.
This is primarily used as an internal result that is used before
converting to the final result in either Arrow format or JSON.
This is the analog of an arrow RecordBatch
.
Implementations§
Source§impl<'a, S: Scalar> Table<'a, S>
impl<'a, S: Scalar> Table<'a, S>
Sourcepub fn try_new(
table: IndexMap<Identifier, Column<'a, S>, BuildHasherDefault<AHasher>>,
) -> Result<Self, TableError>
pub fn try_new( table: IndexMap<Identifier, Column<'a, S>, BuildHasherDefault<AHasher>>, ) -> Result<Self, TableError>
Creates a new Table
with the given columns and default TableOptions
.
Sourcepub fn try_new_with_options(
table: IndexMap<Identifier, Column<'a, S>, BuildHasherDefault<AHasher>>,
options: TableOptions,
) -> Result<Self, TableError>
pub fn try_new_with_options( table: IndexMap<Identifier, Column<'a, S>, BuildHasherDefault<AHasher>>, options: TableOptions, ) -> Result<Self, TableError>
Creates a new Table
with the given columns and with TableOptions
.
Sourcepub fn try_from_iter<T: IntoIterator<Item = (Identifier, Column<'a, S>)>>(
iter: T,
) -> Result<Self, TableError>
pub fn try_from_iter<T: IntoIterator<Item = (Identifier, Column<'a, S>)>>( iter: T, ) -> Result<Self, TableError>
Creates a new Table
from an iterator of (Identifier, Column)
pairs with default TableOptions
.
Sourcepub fn try_from_iter_with_options<T: IntoIterator<Item = (Identifier, Column<'a, S>)>>(
iter: T,
options: TableOptions,
) -> Result<Self, TableError>
pub fn try_from_iter_with_options<T: IntoIterator<Item = (Identifier, Column<'a, S>)>>( iter: T, options: TableOptions, ) -> Result<Self, TableError>
Creates a new Table
from an iterator of (Identifier, Column)
pairs with TableOptions
.
Sourcepub fn num_columns(&self) -> usize
pub fn num_columns(&self) -> usize
Number of columns in the table.
Sourcepub fn into_inner(
self,
) -> IndexMap<Identifier, Column<'a, S>, BuildHasherDefault<AHasher>>
pub fn into_inner( self, ) -> IndexMap<Identifier, Column<'a, S>, BuildHasherDefault<AHasher>>
Returns the columns of this table as an IndexMap
Sourcepub fn inner_table(
&self,
) -> &IndexMap<Identifier, Column<'a, S>, BuildHasherDefault<AHasher>>
pub fn inner_table( &self, ) -> &IndexMap<Identifier, Column<'a, S>, BuildHasherDefault<AHasher>>
Returns the columns of this table as an IndexMap
Sourcepub fn column_names(&self) -> impl Iterator<Item = &Identifier>
pub fn column_names(&self) -> impl Iterator<Item = &Identifier>
Returns the columns of this table as an Iterator
Trait Implementations§
impl<'a, S: Eq + Scalar> Eq for Table<'a, S>
Auto Trait Implementations§
impl<'a, S> Freeze for Table<'a, S>
impl<'a, S> RefUnwindSafe for Table<'a, S>where
S: RefUnwindSafe,
impl<'a, S> Send for Table<'a, S>
impl<'a, S> Sync for Table<'a, S>
impl<'a, S> Unpin for Table<'a, S>
impl<'a, S> UnwindSafe for Table<'a, S>where
S: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more