Trait opendal::raw::oio::PositionWrite

source ·
pub trait PositionWrite: Send + Sync + Unpin + 'static {
    // Required methods
    fn write_all_at(
        &self,
        offset: u64,
        buf: Buffer,
    ) -> impl Future<Output = Result<()>> + MaybeSend;
    fn close(&self) -> impl Future<Output = Result<()>> + MaybeSend;
    fn abort(&self) -> impl Future<Output = Result<()>> + MaybeSend;
}
Expand description

PositionWrite is used to implement oio::Write based on position write.

§Services

Services like fs support position write.

§Architecture

The architecture after adopting PositionWrite:

  • Services impl PositionWrite
  • PositionWriter impl Write
  • Expose PositionWriter as Accessor::Writer

§Requirements

Services that implement PositionWrite must fulfill the following requirements:

  • Writing data based on position: offset.

Required Methods§

source

fn write_all_at( &self, offset: u64, buf: Buffer, ) -> impl Future<Output = Result<()>> + MaybeSend

write_all_at is used to write the data to underlying storage at the specified offset.

source

fn close(&self) -> impl Future<Output = Result<()>> + MaybeSend

close is used to close the underlying file.

source

fn abort(&self) -> impl Future<Output = Result<()>> + MaybeSend

abort is used to abort the underlying abort.

Object Safety§

This trait is not object safe.

Implementors§