pub trait StatelessSourceImpl<V, T>: 'static {
type Part: Distributable + MaybeKey + Hash + Eq;
type SourcePartition: StatelessSourcePartition<V, T>;
// Required methods
fn list_parts(&self) -> Vec<Self::Part>;
fn build_part(&mut self, part: &Self::Part) -> Self::SourcePartition;
}Expand description
Implementation of a stateless stream source
Required Associated Types§
Sourcetype Part: Distributable + MaybeKey + Hash + Eq
type Part: Distributable + MaybeKey + Hash + Eq
A Part of a partition is a key by which any partition of the source is
uniquely identified. It is perfectly valid for a source to only have a single part and in
turn only a single partition, though this may not be very useful.
Sourcetype SourcePartition: StatelessSourcePartition<V, T>
type SourcePartition: StatelessSourcePartition<V, T>
A partition of this source. Each partition must be able to read unique values. Partitions may be moved to different workers, when the jobs worker set changes. Usually partitions will directly relate to some partitioning used by the external system providing the data.
Required Methods§
Sourcefn list_parts(&self) -> Vec<Self::Part>
fn list_parts(&self) -> Vec<Self::Part>
List all initial partitions for this source
Sourcefn build_part(&mut self, part: &Self::Part) -> Self::SourcePartition
fn build_part(&mut self, part: &Self::Part) -> Self::SourcePartition
Build the partition for the given part
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".