pub trait Splitter: Send + Sync {
// Required methods
fn find_split_points(&self, bytes: &[u8], max_chunks: usize) -> Vec<usize>;
fn estimate_bytes_per_row(&self, sample: &[u8]) -> usize;
}Expand description
Format-specific splitter: decides where it is safe to divide an input byte stream into independent chunks.
Required Methods§
Sourcefn find_split_points(&self, bytes: &[u8], max_chunks: usize) -> Vec<usize>
fn find_split_points(&self, bytes: &[u8], max_chunks: usize) -> Vec<usize>
Return sorted byte offsets where the input may be split. The first
offset should normally be 0 and the last should be bytes.len().
Adjacent offsets produce one chunk range.
Sourcefn estimate_bytes_per_row(&self, sample: &[u8]) -> usize
fn estimate_bytes_per_row(&self, sample: &[u8]) -> usize
Estimate the average bytes per record from a sample of the input.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".