Skip to main content

AsyncReaderFactory

Trait AsyncReaderFactory 

Source
pub trait AsyncReaderFactory {
    // Required method
    fn get_reader<'a, 'async_trait>(
        &'a mut self,
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncRead + Sync + Send + Unpin + 'static>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait;
}
Expand description

An AsyncReaderFactory can produce, on demand, an AsyncRead object. In the event of an upload failure, the restarted upload will use a fresh reader to start reading object content at the beginning.

Required Methods§

Source

fn get_reader<'a, 'async_trait>( &'a mut self, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncRead + Sync + Send + Unpin + 'static>>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait,

Get a fresh AsyncRead object, positioned at the beginning of the data to be uploaded.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§