pub trait ScanSource {
// Required methods
fn read_at(&self, offset: u64, out: &mut [u8]) -> Result<usize, QdnfError>;
fn logical_len(&self) -> u64;
}Expand description
Exact-range reader. Implementations must not allocate.
Required Methods§
Sourcefn read_at(&self, offset: u64, out: &mut [u8]) -> Result<usize, QdnfError>
fn read_at(&self, offset: u64, out: &mut [u8]) -> Result<usize, QdnfError>
Copy up to out.len() bytes from offset. Return bytes copied.
Offset at or beyond Self::logical_len yields Ok(0).
Sourcefn logical_len(&self) -> u64
fn logical_len(&self) -> u64
Logical length in bytes. Not an allocated buffer size.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".