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 + '_>>;
}Available on crate feature
async only.Expand description
Abstract file source that can provide byte ranges asynchronously.
Implement this trait for custom byte sources (e.g., HTTP range requests).
The library provides LocalFileMedia for local files.