pub trait ByteSource {
// Required methods
fn len(&self) -> Option<u64>;
fn read_at<'a>(
&'a self,
offset: u64,
destination: &'a mut [u8],
) -> IoFuture<'a, usize>;
// Provided method
fn is_empty(&self) -> Option<bool> { ... }
}Expand description
An asynchronous random-access byte source.
Required Methods§
fn len(&self) -> Option<u64>
fn read_at<'a>( &'a self, offset: u64, destination: &'a mut [u8], ) -> IoFuture<'a, usize>
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl ByteSource for FileSource
Available on Unix or Windows only.