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§
fn length(&self) -> u64
fn name(&self) -> &str
fn read_range( &self, interval: ReadInterval, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + '_>>
Implementors§
impl FileMedia for LocalFileMedia
Available on crate feature
async only.