pub trait AppendWrite:
Send
+ Sync
+ Unpin
+ 'static {
// Required methods
fn offset(&self) -> impl Future<Output = Result<u64>> + MaybeSend;
fn append(
&self,
offset: u64,
size: u64,
body: Buffer,
) -> impl Future<Output = Result<Metadata>> + MaybeSend;
}
Expand description
AppendWrite is used to implement oio::Write
based on append
object. By implementing AppendWrite, services don’t need to
care about the details of buffering and uploading parts.
The layout after adopting AppendWrite
:
- Services impl
AppendWrite
AppendWriter
implWrite
- Expose
AppendWriter
asAccessor::Writer
§Requirements
Services that implement AppendWrite
must fulfill the following requirements:
- Must be a http service that could accept
AsyncBody
. - Provide a way to get the current offset of the append object.
Required Methods§
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.