trait CopyToS3Uploader: Sized {
// Required methods
fn new(
sdk_config: SdkConfig,
connection_details: S3UploadInfo,
sink_id: &GlobalId,
batch: u64,
params: CopyToParameters,
) -> Result<Self, Error>;
async fn force_new_file(&mut self) -> Result<(), Error>;
async fn append_row(&mut self, row: &Row) -> Result<(), Error>;
async fn finish(&mut self) -> Result<(), Error>;
}
Expand description
This trait is used to abstract over the upload details for different file formats. Each format has its own buffering semantics and upload logic, since some can be written in a streaming fashion row-by-row, whereas others use a columnar-based format that requires buffering a batch of rows before writing to S3.
Required Methods§
fn new( sdk_config: SdkConfig, connection_details: S3UploadInfo, sink_id: &GlobalId, batch: u64, params: CopyToParameters, ) -> Result<Self, Error>
Sourceasync fn force_new_file(&mut self) -> Result<(), Error>
async fn force_new_file(&mut self) -> Result<(), Error>
Force the start of a new file, even if no rows have yet been appended or
if the current file has not yet reached the configured max_file_size
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.