pub trait SinkWriter: Send + 'static {
type CommitMetadata: Send = ();
// Required methods
fn begin_epoch<'life0, 'async_trait>(
&'life0 mut self,
epoch: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn write_batch<'life0, 'async_trait>(
&'life0 mut self,
chunk: StreamChunk,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn barrier<'life0, 'async_trait>(
&'life0 mut self,
is_checkpoint: bool,
) -> Pin<Box<dyn Future<Output = Result<Self::CommitMetadata>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn abort<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Provided Associated Types§
type CommitMetadata: Send = ()
Required Methods§
Sourcefn begin_epoch<'life0, 'async_trait>(
&'life0 mut self,
epoch: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn begin_epoch<'life0, 'async_trait>(
&'life0 mut self,
epoch: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Begin a new epoch
Sourcefn write_batch<'life0, 'async_trait>(
&'life0 mut self,
chunk: StreamChunk,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn write_batch<'life0, 'async_trait>(
&'life0 mut self,
chunk: StreamChunk,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Write a stream chunk to sink
Sourcefn barrier<'life0, 'async_trait>(
&'life0 mut self,
is_checkpoint: bool,
) -> Pin<Box<dyn Future<Output = Result<Self::CommitMetadata>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn barrier<'life0, 'async_trait>(
&'life0 mut self,
is_checkpoint: bool,
) -> Pin<Box<dyn Future<Output = Result<Self::CommitMetadata>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Receive a barrier and mark the end of current epoch. When is_checkpoint is true, the sink
writer should commit the current epoch.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".