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§
Sourcefn supports(&self, file: &FileDescriptor) -> bool
fn supports(&self, file: &FileDescriptor) -> bool
Returns whether this extractor can consume a candidate file.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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,
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".