Trait opendal::raw::oio::Write

source ·
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§

source

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.
source

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

Close the writer and make sure all data has been flushed.

source

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

Abort the pending writer.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Write for ()

source§

async fn write(&mut self, _: Buffer) -> Result<()>

source§

async fn close(&mut self) -> Result<()>

source§

async fn abort(&mut self) -> Result<()>

source§

impl<T: WriteDyn + ?Sized> Write for Box<T>

source§

async fn write(&mut self, bs: Buffer) -> Result<()>

source§

async fn close(&mut self) -> Result<()>

source§

async fn abort(&mut self) -> Result<()>

Implementors§

source§

impl<ONE: Write, TWO: Write> Write for TwoWays<ONE, TWO>

source§

impl<ONE: Write, TWO: Write, THREE: Write> Write for ThreeWays<ONE, TWO, THREE>

source§

impl<W> Write for AppendWriter<W>
where W: AppendWrite,

source§

impl<W> Write for BlockWriter<W>
where W: BlockWrite,

source§

impl<W> Write for MultipartWriter<W>
where W: MultipartWrite,

source§

impl<W: OneShotWrite> Write for OneShotWriter<W>

source§

impl<W: PositionWrite> Write for PositionWriter<W>

source§

impl<W: RangeWrite> Write for RangeWriter<W>