pub trait FileWrite: Send + Unpin + 'static {
// Required methods
fn write<'life0, 'async_trait>(
&'life0 mut self,
bs: Bytes,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Trait for writing file.
§TODO
It’s possible for us to remove the async_trait, but we need to figure out how to handle the object safety.