pub trait PartitionSpec:
Send
+ Sync
+ Debug {
// Required methods
fn is_empty(&self) -> bool;
fn get_source_data_hash(&self) -> Vec<u8> ⓘ;
fn write<'life0, 'async_trait>(
&'life0 self,
lake: Arc<DataLakeConnection>,
logger: Arc<dyn Logger>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
// Provided method
fn write_file<'life0, 'async_trait>(
&'life0 self,
_lake: Arc<DataLakeConnection>,
_logger: Arc<dyn Logger>,
) -> Pin<Box<dyn Future<Output = Result<Partition, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait { ... }
}Expand description
A trait for defining a partition specification.
Required Methods§
Sourcefn get_source_data_hash(&self) -> Vec<u8> ⓘ
fn get_source_data_hash(&self) -> Vec<u8> ⓘ
Returns a hash of the source data.
Provided Methods§
Sourcefn write_file<'life0, 'async_trait>(
&'life0 self,
_lake: Arc<DataLakeConnection>,
_logger: Arc<dyn Logger>,
) -> Pin<Box<dyn Future<Output = Result<Partition, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn write_file<'life0, 'async_trait>(
&'life0 self,
_lake: Arc<DataLakeConnection>,
_logger: Arc<dyn Logger>,
) -> Pin<Box<dyn Future<Output = Result<Partition, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Writes the partition file without registering it, and returns the unregistered
Partition. The caller registers it (see insert_partitions_replacing) or deletes the
file.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".