pub trait DetectionSource {
// Required methods
fn read_at(&mut self, offset: u64, buf: &mut [u8]) -> Result<usize>;
fn total_len(&self) -> Option<u64>;
// Provided methods
fn read_bof(&mut self, max_len: usize) -> Result<Vec<u8>> { ... }
fn read_eof(&mut self, max_len: usize) -> Result<Vec<u8>> { ... }
}Expand description
Abstraction for streamed or buffered payload access during format detection.