Skip to main content

BoundaryExtractor

Trait BoundaryExtractor 

Source
pub trait BoundaryExtractor: Send + Sync {
    // Required methods
    fn id(&self) -> &'static str;
    fn version(&self) -> Version;
    fn supports(&self, file: &FileDescriptor) -> bool;
    fn discover<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        context: &'life1 DiscoverContext<'life2>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<DiscoveredInput>, ExtractorError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn extract<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        input: &'life1 ExtractInput<'life2>,
    ) -> Pin<Box<dyn Future<Output = Result<ExtractionBatch, ExtractorError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn fingerprint<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        input: &'life1 ExtractInput<'life2>,
    ) -> Pin<Box<dyn Future<Output = Result<ContentFingerprint, ExtractorError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Focused, deterministic contract extractor.

Required Methods§

Source

fn id(&self) -> &'static str

Stable extractor identity.

Source

fn version(&self) -> Version

Extractor and payload-schema semantic version.

Source

fn supports(&self, file: &FileDescriptor) -> bool

Returns whether this extractor can consume a candidate file.

Source

fn discover<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, context: &'life1 DiscoverContext<'life2>, ) -> Pin<Box<dyn Future<Output = Result<Vec<DiscoveredInput>, ExtractorError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Selects supported files from a bounded deterministic inventory.

Source

fn extract<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, input: &'life1 ExtractInput<'life2>, ) -> Pin<Box<dyn Future<Output = Result<ExtractionBatch, ExtractorError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Produces a complete replacement batch for one source file.

Source

fn fingerprint<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, input: &'life1 ExtractInput<'life2>, ) -> Pin<Box<dyn Future<Output = Result<ContentFingerprint, ExtractorError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Computes the source fingerprint used for incremental reuse.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§