pub trait AsyncWriterFactory {
    fn get_writer<'a, 'async_trait>(
        &'a mut self
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncWrite + Unpin + 'a>>> + Send + 'async_trait>>
    where
        'a: 'async_trait,
        Self: 'async_trait
; }
Expand description

An AsyncWriterFactory can produce, on demand, an AsyncWrite object. In the event of a download failure, the restarted download will use a fresh writer to restart writing at the beginning.

Required methods

Get a fresh AsyncWrite object, positioned at the point where downloaded data should be written.

Implementors