Trait connectorx::sources::SourcePartition
source · pub trait SourcePartition {
type TypeSystem: TypeSystem;
type Parser<'a>: PartitionParser<'a, TypeSystem = Self::TypeSystem, Error = Self::Error>
where Self: 'a;
type Error: From<ConnectorXError> + Send + Debug;
// Required methods
fn result_rows(&mut self) -> Result<(), Self::Error>;
fn parser(&mut self) -> Result<Self::Parser<'_>, Self::Error>;
fn nrows(&self) -> usize;
fn ncols(&self) -> usize;
}
Expand description
In general, a DataSource
abstracts the data source as a stream, which can produce
a sequence of values of variate types by repetitively calling the function produce
.
Required Associated Types§
type TypeSystem: TypeSystem
type Parser<'a>: PartitionParser<'a, TypeSystem = Self::TypeSystem, Error = Self::Error> where Self: 'a
type Error: From<ConnectorXError> + Send + Debug
Required Methods§
sourcefn result_rows(&mut self) -> Result<(), Self::Error>
fn result_rows(&mut self) -> Result<(), Self::Error>
Count total number of rows in each partition.
fn parser(&mut self) -> Result<Self::Parser<'_>, Self::Error>
Object Safety§
This trait is not object safe.