pub trait PartitionedSink: Sink {
type PartitionKey;
// Required methods
fn write_to_partition(
&mut self,
partition: Self::PartitionKey,
item: Self::Item,
) -> Result<(), SynthError>;
fn flush_partition(
&mut self,
partition: Self::PartitionKey,
) -> Result<(), SynthError>;
}Expand description
Trait for sinks that support partitioned output.
Required Associated Types§
Sourcetype PartitionKey
type PartitionKey
The partition key type.
Required Methods§
Sourcefn write_to_partition(
&mut self,
partition: Self::PartitionKey,
item: Self::Item,
) -> Result<(), SynthError>
fn write_to_partition( &mut self, partition: Self::PartitionKey, item: Self::Item, ) -> Result<(), SynthError>
Write an item to a specific partition.
Sourcefn flush_partition(
&mut self,
partition: Self::PartitionKey,
) -> Result<(), SynthError>
fn flush_partition( &mut self, partition: Self::PartitionKey, ) -> Result<(), SynthError>
Flush a specific partition.