Skip to main content

SkipRegionFinder

Trait SkipRegionFinder 

Source
pub trait SkipRegionFinder: Send + Sync {
    // Required methods
    fn openers(&self) -> &[&'static [u8]];
    fn closer_for(&self, opener: &[u8]) -> &'static [u8] ⓘ;

    // Provided method
    fn window(&self) -> usize { ... }
}
Expand description

Finds byte ranges (comments, CDATA, quoted fields, string literals) where a candidate record boundary must be rejected. The engine calls this during split-point discovery to avoid splitting inside comments or strings.

Required Methods§

Source

fn openers(&self) -> &[&'static [u8]]

Openers that start a skip region (e.g. b"<!--", b"<![CDATA[").

Source

fn closer_for(&self, opener: &[u8]) -> &'static [u8] ⓘ

The closer for a given opener (e.g. "-->" for "<!--").

Provided Methods§

Source

fn window(&self) -> usize

Maximum backward scan window in bytes. Default 64 KiB: sufficient for most XML/CSV comments and JSON string literals.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§