Skip to main content

Processor

Trait Processor 

Source
pub trait Processor {
    // Required methods
    fn handles(&self, media_type: &str) -> bool;
    fn process(
        &self,
        asset_uri: &str,
        bytes: &[u8],
        media_type: &str,
    ) -> ProcessorOutput;
}
Expand description

A processor: ingest an asset (bytes + media-type) → derive its searchable representations + facets.

Required Methods§

Source

fn handles(&self, media_type: &str) -> bool

Whether this processor handles the given media type.

Source

fn process( &self, asset_uri: &str, bytes: &[u8], media_type: &str, ) -> ProcessorOutput

Derive searchable content + descriptors + flags from the asset.

Implementors§