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
implWrite
- Expose
PositionWriter
asAccessor::Writer
§Requirements
Services that implement PositionWrite
must fulfill the following requirements:
- Writing data based on position:
offset
.
Required Methods§
sourcefn write_all_at(
&self,
offset: u64,
buf: Buffer,
) -> impl Future<Output = Result<()>> + MaybeSend
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.
Object Safety§
This trait is not object safe.