pub trait AsyncRangeRead {
type Fut<'a>: Future<Output = Result<()>>
where Self: 'a;
// Required methods
fn total_size(&self) -> usize;
fn range_read<'a>(
&'a self,
buf: &'a mut [u8],
offset: usize,
) -> Self::Fut<'a>;
}
Required Associated Types§
Required Methods§
Sourcefn total_size(&self) -> usize
fn total_size(&self) -> usize
Returns data total size
Sourcefn range_read<'a>(&'a self, buf: &'a mut [u8], offset: usize) -> Self::Fut<'a>
fn range_read<'a>(&'a self, buf: &'a mut [u8], offset: usize) -> Self::Fut<'a>
Load buf.len()
count of bytes from data starting from offset
into buf
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.