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<Metadata>> + 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 PositionWriterimplWrite- Expose
PositionWriterasAccessor::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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.