pub struct FileDataSource { /* private fields */ }Expand description
A file-based data source
Implementations§
Trait Implementations§
Source§impl DataSource for FileDataSource
impl DataSource for FileDataSource
Source§fn read_range(&self, range: ByteRange) -> Result<Vec<u8>>
fn read_range(&self, range: ByteRange) -> Result<Vec<u8>>
Reads bytes from the specified range
Source§fn read_ranges(&self, ranges: &[ByteRange]) -> Result<Vec<Vec<u8>>>
fn read_ranges(&self, ranges: &[ByteRange]) -> Result<Vec<Vec<u8>>>
Reads bytes from multiple ranges (for optimization)
Source§fn supports_range_requests(&self) -> bool
fn supports_range_requests(&self) -> bool
Returns true if this data source supports range requests
Auto Trait Implementations§
impl !Freeze for FileDataSource
impl RefUnwindSafe for FileDataSource
impl Send for FileDataSource
impl Sync for FileDataSource
impl Unpin for FileDataSource
impl UnsafeUnpin for FileDataSource
impl UnwindSafe for FileDataSource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more