pub trait ByteSource: Sync {
// Required methods
fn len(&self) -> u64;
fn read_at(&self, at: u64, buf: &mut [u8]) -> usize;
// Provided method
fn is_empty(&self) -> bool { ... }
}Expand description
Bytes read on demand from somewhere too large to hold in memory, such as
a huge file the app reads in pieces (see Searcher::find_next_in).
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".