pub trait Restart {
    // Required methods
    fn call_restart<'life0, 'async_trait>(
        &'life0 mut self,
        time: Option<Duration>
    ) -> Pin<Box<dyn Future<Output = Result<Input>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn lazy_init<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<(Option<Metadata>, Codec, Container)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait used to create an instance of a Reader at instantiation and when a backwards seek is needed.

Required Methods§

source

fn call_restart<'life0, 'async_trait>( &'life0 mut self, time: Option<Duration> ) -> Pin<Box<dyn Future<Output = Result<Input>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Tries to create a replacement source.

source

fn lazy_init<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<(Option<Metadata>, Codec, Container)>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Optionally retrieve metadata for a source which has been lazily initialised.

This is particularly useful for sources intended to be queued, which should occupy few resources when not live BUT have as much information as possible made available at creation.

Implementors§