Trait opendal::raw::oio::OneShotWrite

source ·
pub trait OneShotWrite: Send + Sync + Unpin + 'static {
    // Required method
    fn write_once(
        &self,
        bs: Buffer
    ) -> impl Future<Output = Result<()>> + MaybeSend;
}
Expand description

OneShotWrite is used to implement [Write] based on one shot operation. By implementing OneShotWrite, services don’t need to care about the details.

For example, S3 PUT Object and fs write_all.

The layout after adopting OneShotWrite:

Required Methods§

source

fn write_once(&self, bs: Buffer) -> impl Future<Output = Result<()>> + MaybeSend

write_once write all data at once.

Implementations should make sure that the data is written correctly at once.

Object Safety§

This trait is not object safe.

Implementors§