Skip to main content

FileMedia

Trait FileMedia 

Source
pub trait FileMedia: Send + Sync {
    // Required methods
    fn length(&self) -> u64;
    fn name(&self) -> &str;
    fn read_range(
        &self,
        interval: ReadInterval,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + '_>>;
}
Expand description

Abstract file source that can provide byte ranges asynchronously.

Required Methods§

Source

fn length(&self) -> u64

Source

fn name(&self) -> &str

Source

fn read_range( &self, interval: ReadInterval, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + '_>>

Implementors§

Source§

impl FileMedia for LocalFileMedia

Available on crate feature async only.