pub trait Write: Unpin + Send + Sync {
// Required methods
fn write(
&mut self,
bs: Buffer,
) -> impl Future<Output = Result<()>> + MaybeSend;
fn close(&mut self) -> impl Future<Output = Result<()>> + MaybeSend;
fn abort(&mut self) -> impl Future<Output = Result<()>> + MaybeSend;
}
Expand description
Write is the trait that OpenDAL returns to callers.
Required Methods§
sourcefn write(&mut self, bs: Buffer) -> impl Future<Output = Result<()>> + MaybeSend
fn write(&mut self, bs: Buffer) -> impl Future<Output = Result<()>> + MaybeSend
Write given bytes into writer.
§Behavior
Ok(())
means all bytes has been written successfully.Err(err)
means error happens and no bytes has been written.
Object Safety§
This trait is not object safe.