pub trait SstableWriter: Send {
type Output;
// Required methods
fn write_block<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
block: &'life1 [u8],
meta: &'life2 BlockMeta,
) -> Pin<Box<dyn Future<Output = HummockResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn write_block_bytes<'life0, 'life1, 'async_trait>(
&'life0 mut self,
block: Bytes,
meta: &'life1 BlockMeta,
) -> Pin<Box<dyn Future<Output = HummockResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn finish<'async_trait>(
self,
meta: SstableMeta,
) -> Pin<Box<dyn Future<Output = HummockResult<Self::Output>> + Send + 'async_trait>>
where Self: 'async_trait;
fn data_len(&self) -> usize;
}
Expand description
A consumer of SST data.
Required Associated Types§
Required Methods§
sourcefn write_block<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
block: &'life1 [u8],
meta: &'life2 BlockMeta,
) -> Pin<Box<dyn Future<Output = HummockResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn write_block<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
block: &'life1 [u8],
meta: &'life2 BlockMeta,
) -> Pin<Box<dyn Future<Output = HummockResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Write an SST block to the writer.
fn write_block_bytes<'life0, 'life1, 'async_trait>(
&'life0 mut self,
block: Bytes,
meta: &'life1 BlockMeta,
) -> Pin<Box<dyn Future<Output = HummockResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
sourcefn finish<'async_trait>(
self,
meta: SstableMeta,
) -> Pin<Box<dyn Future<Output = HummockResult<Self::Output>> + Send + 'async_trait>>where
Self: 'async_trait,
fn finish<'async_trait>(
self,
meta: SstableMeta,
) -> Pin<Box<dyn Future<Output = HummockResult<Self::Output>> + Send + 'async_trait>>where
Self: 'async_trait,
Finish writing the SST.