pub trait WriteObjectHandle: ObjectHandle {
    // Required methods
    fn write_or_append<'life0, 'life1, 'async_trait>(
        &'life0 self,
        offset: Option<u64>,
        buf: BufferRef<'life1>
    ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn truncate<'life0, 'async_trait>(
        &'life0 self,
        size: u64
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn flush<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

source

fn write_or_append<'life0, 'life1, 'async_trait>( &'life0 self, offset: Option<u64>, buf: BufferRef<'life1> ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Writes |buf.len())| bytes at |offset| (or the end of the file), returning the object size after writing. The writes may be cached, in which case a later call to |flush| is necessary to persist the writes.

source

fn truncate<'life0, 'async_trait>( &'life0 self, size: u64 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Truncates the object to |size| bytes. The truncate may be cached, in which case a later call to |flush| is necessary to persist the truncate.

source

fn flush<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Flushes all pending data and metadata updates for the object.

Implementors§