Skip to main content

RegionSource

Trait RegionSource 

Source
pub trait RegionSource {
    // Required method
    fn read_at(&self, offset: u64, buf: &mut [u8]) -> usize;
}
Expand description

A positioned-read edge over the source being swept. Disk drivers implement it over forensic-vfs positioned reads; memory drivers over read_virt. A short read (fewer bytes than requested) signals a gap or end-of-source — the engine treats the window as truncated, never fabricating bytes.

Required Methods§

Source

fn read_at(&self, offset: u64, buf: &mut [u8]) -> usize

Read into buf starting at absolute offset; return the number of bytes actually read (0 at/after the end, short at a gap).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§