Skip to main content

ObjectBody

Trait ObjectBody 

Source
pub trait ObjectBody: Send {
    // Required method
    fn read<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        output: &'life1 mut [u8],
    ) -> Pin<Box<dyn Future<Output = Result<usize, StorageError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

A native response body. Reads never exceed the supplied buffer; zero means transport completed and any replacement-revision check also succeeded.

Required Methods§

Source

fn read<'life0, 'life1, 'async_trait>( &'life0 mut self, output: &'life1 mut [u8], ) -> Pin<Box<dyn Future<Output = Result<usize, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Receive the next bytes of this response, without starting another body request.

Implementations on Foreign Types§

Source§

impl<T: AsRef<[u8]> + Send> ObjectBody for Cursor<T>

Source§

fn read<'life0, 'life1, 'async_trait>( &'life0 mut self, output: &'life1 mut [u8], ) -> Pin<Box<dyn Future<Output = Result<usize, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§