Skip to main content

KeyProcessor

Trait KeyProcessor 

Source
pub trait KeyProcessor: Send + Sync {
    // Required methods
    fn can_process(
        &self,
        extractor_type: ExtractorType,
        key_line: &str,
        manifest_url: &str,
        manifest_content: &str,
        config: &ParserConfig,
    ) -> bool;
    fn process<'a>(
        &'a self,
        key_line: &'a str,
        manifest_url: &'a str,
        manifest_content: &'a str,
        config: &'a ParserConfig,
    ) -> Pin<Box<dyn Future<Output = Result<EncryptionInfo>> + Send + 'a>>;
}
Expand description

Key parser hook.

Required Methods§

Source

fn can_process( &self, extractor_type: ExtractorType, key_line: &str, manifest_url: &str, manifest_content: &str, config: &ParserConfig, ) -> bool

Returns whether this processor should run.

Source

fn process<'a>( &'a self, key_line: &'a str, manifest_url: &'a str, manifest_content: &'a str, config: &'a ParserConfig, ) -> Pin<Box<dyn Future<Output = Result<EncryptionInfo>> + Send + 'a>>

Processes one key line.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§