Skip to main content

BlockMatcher

Trait BlockMatcher 

Source
pub trait BlockMatcher: Send + Sync {
    // Required methods
    fn scan_block<'life0, 'life1, 'async_trait>(
        &'life0 self,
        data: &'life1 [u8],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Match>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn max_block_size(&self) -> usize;
}
Expand description

Block-based matching for large continuous scans bounded by memory.

Implementations advertise their maximum block size so callers can chunk input appropriately for streaming pipelines.

Required Methods§

Source

fn scan_block<'life0, 'life1, 'async_trait>( &'life0 self, data: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = Result<Vec<Match>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Submit a block of data for scanning.

Source

fn max_block_size(&self) -> usize

Return the maximum block size supported by the hardware or configuration.

Implementors§